LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 02-14-2017, 07:43 AM   #1
rhinolt
Member
 
Registered: Jan 2017
Posts: 30

Rep: Reputation: Disabled
trying set up a postfix+dovecot server in vmware,but cant receive mail to myself


CentOS7 with postfix+dovecot+postfixadmin+cyrus+mariadb
each service running w\o error
check telnet seems fine

Code:
telnet localhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 mail.example.com ESMTP Postfix
ehlo example.com
250-mail.example.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN CRAM-MD5
250-AUTH=PLAIN LOGIN CRAM-MD5
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
and postfixadmin could add mailboxes

Code:
MariaDB [postfix]> select * from mailbox;
+------------------------+----------------------------------------------------------------------------+-------+-------------------------+------------+------------+------------------+---------------------+---------------------+--------+
| username               | password                                                                   | name  | maildir                 | quota      | local_part | domain           | created             | modified            | active |
+------------------------+----------------------------------------------------------------------------+-------+-------------------------+------------+------------+------------------+---------------------+---------------------+--------+
| test1@example.com      | {CRAM-MD5}8314fef5923bb513c7e8be9e663501bbc56ce1012aae68e4c68852be5ab8da76 | test1 | example.com/test1/      | 1024000000 | test1      | example.com      | 2017-02-13 00:22:20 | 2017-02-13 00:22:20 |      1 |
| test1@mail.example.com | {CRAM-MD5}8314fef5923bb513c7e8be9e663501bbc56ce1012aae68e4c68852be5ab8da76 | test2 | mail.example.com/test1/ | 1024000000 | test1      | mail.example.com | 2017-02-13 00:31:46 | 2017-02-13 00:31:46 |      1 |
| test2@mail.example.com | {CRAM-MD5}8314fef5923bb513c7e8be9e663501bbc56ce1012aae68e4c68852be5ab8da76 | test2 | mail.example.com/test2/ | 1024000000 | test2      | mail.example.com | 2017-02-13 00:32:00 | 2017-02-13 00:32:00 |      1 |
| test2@example.com      | {CRAM-MD5}8314fef5923bb513c7e8be9e663501bbc56ce1012aae68e4c68852be5ab8da76 | test2 | example.com/test2/      |    2048000 | test2      | example.com      | 2017-02-14 08:36:26 | 2017-02-14 08:36:26 |      1 |
+------------------------+----------------------------------------------------------------------------+-------+-------------------------+------------+------------+------------------+---------------------+---------------------+--------+
4 rows in set (0.00 sec)
the problem is i cant receive a mail deliver by thunderbird

check dovecot_info.log

Code:
Feb 14 08:05:37 auth-worker(121546): Info: passwd(test2@mail.example.com,192.168.10.1): unknown user 
Feb 14 08:05:37 imap-login: Info: Login: user=<test2@mail.example.com>, method=CRAM-MD5, rip=192.168.10.1, lip=192.168.10.1, mpid=121553, secured, session=<LGldOH1I9wDAqAoB>
[root@server /var/log]
check dovecot_debug.log

Code:
Feb 14 08:05:36 auth: Debug: client in: AUTH	2	CRAM-MD5	service=smtp	nologin	lip=192.168.10.1	rip=192.168.10.1
Feb 14 08:05:36 auth: Debug: client passdb out: CONT	2	PDA3MzY2MjM2MDEyNzkyMTAuMTQ4NzA3NzUzNkBzZXJ2ZXIuZXhhbXBsZS5jb20+
Feb 14 08:05:36 auth: Debug: client in: CONT	2	dGVzdDJAbWFpbC5leGFtcGxlLmNvbSBjNmMxMWQ5YWVjYzc3NmFhZjk1ZGIzZjZjMDc2ZDY0Nw== (previous base64 data may contain sensitive data)
Feb 14 08:05:36 auth: Debug: password(test2@mail.example.com,192.168.10.1): passdb doesn't support credential lookups
Feb 14 08:05:37 auth-worker(121546): Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Feb 14 08:05:37 auth-worker(121546): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_mysql.so
Feb 14 08:05:37 auth-worker(121546): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_pgsql.so
Feb 14 08:05:37 auth-worker(121546): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Feb 14 08:05:37 auth-worker(121546): Debug: sql(test2@mail.example.com,192.168.10.1): query: SELECT username AS user,password FROM mailbox WHERE username = 'test2@mail.example.com' AND active='1'
Feb 14 08:05:37 auth: Debug: password(test2@mail.example.com,192.168.10.1): Credentials: 8314fef5923bb513c7e8be9e663501bbc56ce1012aae68e4c68852be5ab8da76
Feb 14 08:05:37 auth: Debug: client passdb out: OK	2	user=test2@mail.example.com
Feb 14 08:05:37 auth: Debug: auth client connected (pid=121552)
Feb 14 08:05:37 auth: Debug: client in: AUTH	1	CRAM-MD5	service=imap	secured	session=LGldOH1I9wDAqAoB	lip=192.168.10.1	rip=192.168.10.1	lport=143	rport=51959
Feb 14 08:05:37 auth: Debug: client passdb out: CONT	1	PDYzNDI1NjY5OTMzMzc2MzQuMTQ4NzA3NzUzN0BzZXJ2ZXIuZXhhbXBsZS5jb20+
Feb 14 08:05:37 auth: Debug: client in: CONT	1	dGVzdDJAbWFpbC5leGFtcGxlLmNvbSBiNzU3ZmZiODFlMThmMjg2NWFlYjcyMTk4ODJmZGYwZQ== (previous base64 data may contain sensitive data)
Feb 14 08:05:37 auth: Debug: password(test2@mail.example.com,192.168.10.1,<LGldOH1I9wDAqAoB>): passdb doesn't support credential lookups
Feb 14 08:05:37 auth-worker(121546): Debug: sql(test2@mail.example.com,192.168.10.1): query: SELECT username AS user,password FROM mailbox WHERE username = 'test2@mail.example.com' AND active='1'
Feb 14 08:05:37 auth: Debug: password(test2@mail.example.com,192.168.10.1,<LGldOH1I9wDAqAoB>): Credentials: 8314fef5923bb513c7e8be9e663501bbc56ce1012aae68e4c68852be5ab8da76
Feb 14 08:05:37 auth: Debug: client passdb out: OK	1	user=test2@mail.example.com
Feb 14 08:05:37 auth: Debug: master in: REQUEST	4013948929	121552	1	7db25eab82cbd0274899c2dcadd586e4	session_pid=121553	request_auth_token
Feb 14 08:05:37 auth-worker(121546): Debug: passwd(test2@mail.example.com,192.168.10.1): lookup
Feb 14 08:05:37 auth: Debug: master userdb out: USER	4013948929	test2@mail.example.com	uid=5000	gid=5000	home=/home/vmail/mail.example.com/test2	auth_token=113dcf23896dfec364c80ae471a8ffebc983758a
Feb 14 08:05:37 imap(test2@mail.example.com): Debug: Effective uid=5000, gid=5000, home=/home/vmail/mail.example.com/test2
Feb 14 08:05:37 imap(test2@mail.example.com): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/home/vmail/mail.example.com/test2/Maildir
Feb 14 08:05:37 imap(test2@mail.example.com): Debug: maildir++: root=/home/vmail/mail.example.com/test2/Maildir, index=, indexpvt=, control=, inbox=/home/vmail/mail.example.com/test2/Maildir, alt=
check postfix log

Code:
Feb 14 08:05:36 server postfix/smtpd[121491]: connect from server.example.com[192.168.10.1]
Feb 14 08:05:37 server postfix/smtpd[121491]: 17F2A61603D5: client=server.example.com[192.168.10.1], sasl_method=CRAM-MD5, sasl_username=test2@mail.example.com
Feb 14 08:05:37 server postfix/cleanup[121505]: 17F2A61603D5: message-id=<07fa6ba7-d6d1-2a83-e426-33730dacf48b@mail.example.com>
Feb 14 08:05:37 server postfix/qmgr[120987]: 17F2A61603D5: from=<test2@mail.example.com>, size=598, nrcpt=1 (queue active)
Feb 14 08:05:37 server postfix/trivial-rewrite[121501]: warning: do not list domain mail.example.com in BOTH mydestination and virtual_mailbox_domains
Feb 14 08:05:37 server postfix/local[121506]: 17F2A61603D5: to=<test1@mail.example.com>, relay=local, delay=0.12, delays=0.09/0.02/0/0.01, dsn=5.1.1, status=bounced (unknown user: "test1")
Feb 14 08:05:37 server postfix/cleanup[121505]: 30B9C64D711B: message-id=<20170214130537.30B9C64D711B@mail.example.com>
Feb 14 08:05:37 server postfix/bounce[121507]: 17F2A61603D5: sender non-delivery notification: 30B9C64D711B
Feb 14 08:05:37 server postfix/qmgr[120987]: 17F2A61603D5: removed
Feb 14 08:05:37 server postfix/qmgr[120987]: 30B9C64D711B: from=<>, size=2463, nrcpt=1 (queue active)
Feb 14 08:05:37 server postfix/trivial-rewrite[121501]: warning: do not list domain mail.example.com in BOTH mydestination and virtual_mailbox_domains
Feb 14 08:05:37 server postfix/local[121506]: 30B9C64D711B: to=<test2@mail.example.com>, relay=local, delay=0.07, delays=0.05/0.01/0/0.01, dsn=5.1.1, status=bounced (unknown user: "test2")
Feb 14 08:05:37 server postfix/qmgr[120987]: 30B9C64D711B: removed
Feb 14 08:05:37 server postfix/smtpd[121491]: disconnect from server.example.com[192.168.10.1]
journalctl -xe

Code:
Feb 14 08:05:36 server.example.com postfix/smtpd[121491]: connect from server.example.com[192.168.10.1]
Feb 14 08:05:37 server.example.com postfix/smtpd[121491]: 17F2A61603D5: client=server.example.com[192.168.10.1], sasl_method=CRAM-MD5, sasl_username=test2@mail.example.com
Feb 14 08:05:37 server.example.com postfix/cleanup[121505]: 17F2A61603D5: message-id=<07fa6ba7-d6d1-2a83-e426-33730dacf48b@mail.example.com>
Feb 14 08:05:37 server.example.com postfix/qmgr[120987]: 17F2A61603D5: from=<test2@mail.example.com>, size=598, nrcpt=1 (queue active)
Feb 14 08:05:37 server.example.com postfix/trivial-rewrite[121501]: warning: do not list domain mail.example.com in BOTH mydestination and virtual_mailbox_domains
Feb 14 08:05:37 server.example.com postfix/local[121506]: 17F2A61603D5: to=<test1@mail.example.com>, relay=local, delay=0.12, delays=0.09/0.02/0/0.01, dsn=5.1.1, status=boun
Feb 14 08:05:37 server.example.com postfix/cleanup[121505]: 30B9C64D711B: message-id=<20170214130537.30B9C64D711B@mail.example.com>
Feb 14 08:05:37 server.example.com postfix/bounce[121507]: 17F2A61603D5: sender non-delivery notification: 30B9C64D711B
Feb 14 08:05:37 server.example.com postfix/qmgr[120987]: 17F2A61603D5: removed
Feb 14 08:05:37 server.example.com postfix/qmgr[120987]: 30B9C64D711B: from=<>, size=2463, nrcpt=1 (queue active)
Feb 14 08:05:37 server.example.com postfix/trivial-rewrite[121501]: warning: do not list domain mail.example.com in BOTH mydestination and virtual_mailbox_domains
Feb 14 08:05:37 server.example.com postfix/local[121506]: 30B9C64D711B: to=<test2@mail.example.com>, relay=local, delay=0.07, delays=0.05/0.01/0/0.01, dsn=5.1.1, status=boun
Feb 14 08:05:37 server.example.com postfix/qmgr[120987]: 30B9C64D711B: removed
Feb 14 08:05:37 server.example.com postfix/smtpd[121491]: disconnect from server.example.com[192.168.10.1]


somebody help me pretty pls :P
 
Old 02-15-2017, 12:36 AM   #2
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by rhinolt View Post
Code:
warning: do not list domain mail.example.com in BOTH mydestination and virtual_mailbox_domains
.... status=bounced (unknown user: "test2")
This is the relavent bit.

Last edited by descendant_command; 02-15-2017 at 12:37 AM.
 
Old 02-15-2017, 06:10 AM   #3
rhinolt
Member
 
Registered: Jan 2017
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by descendant_command View Post
This is the relavent bit.
hrm,how to fix it pls?


/etc/postfix/main.cf

Code:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = mail.example.com
mydomain = example.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost
local_recipient_maps =
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
     PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
     ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.6.6/samples
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
smtpd_sasl_type = dovecot
smtpd_sasl_path = /var/spool/postfix/private/auth
smtpd_sasl_application_name = smtpd
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination,reject_unknown_sender_domain
smtpd_sasl_security_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_client_restrictions = permit_sasl_authenticated
smtpd_sasl_security_options = noanonymous
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
virtual_mailbox_base = /home/vmail/
virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
virtual_alias_maps =
   proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf,
   proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf,
   proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf
virtual_mailbox_maps =
   proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf,
   proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1

/etc/postfix/sql/mysql_virtual_domains_maps.cf

Code:
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT domain FROM domain WHERE domain='%s' AND active = '1'

Last edited by rhinolt; 02-15-2017 at 06:20 AM.
 
Old 02-15-2017, 06:13 AM   #4
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by rhinolt View Post
hrm,how to fix it pls?
do not list domain mail.example.com in BOTH mydestination and virtual_mailbox_domains
 
Old 02-15-2017, 06:25 AM   #5
rhinolt
Member
 
Registered: Jan 2017
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by descendant_command View Post
do not list domain mail.example.com in BOTH mydestination and virtual_mailbox_domains
i put a comment # before "mydestination = $myhostname, localhost.$mydomain, localhost" in main.cf,but doesnt work
 
Old 02-15-2017, 06:31 AM   #6
rhinolt
Member
 
Registered: Jan 2017
Posts: 30

Original Poster
Rep: Reputation: Disabled
command "postfix check" shows

Code:
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpd_sasl_application_name=smtpd
/usr/sbin/postconf: warning: /etc/postfix/main.cf: undefined parameter: virtual_mailbox_limit_maps
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpd_sasl_security_restrictions=permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpd_sasl_application_name=smtpd
 
Old 02-16-2017, 04:43 PM   #7
rhinolt
Member
 
Registered: Jan 2017
Posts: 30

Original Poster
Rep: Reputation: Disabled
someone help me pretty please??

also have these messages seems to be lda issue,but dunno how to fix it

Code:
Feb 16 03:00:08 server.example.com dovecot[1064]: lda: Error: userdb lookup(test2@example.com): Disconn
Feb 16 03:00:08 server.example.com dovecot[1064]: lda: Fatal: Internal error occurred. Refer to server 
Feb 16 03:00:08 server.example.com dovecot[1024]: auth: Fatal: master: service(auth): child 1052 killed
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can send mail but Not able to receive mail. Postfixadmin, dovecot, postfix setup RajeshThakur Linux - Newbie 9 04-20-2012 08:31 AM
Can't send/receive mail using Postfix/Dovecot on CentOS 5 sh4ka Linux - Newbie 4 04-20-2011 08:12 AM
Mail Server with : Postfix,dovecot. (Can send email, but can't receive email from internet mail) cparapat Linux - Server 1 08-16-2010 12:57 AM
Postfix-dovecot cannot receive mail coad Linux - Server 3 06-03-2009 11:59 PM
LXer: Debian Mail Server Setup with Postfix + Dovecot + SASL + Squirrel Mail LXer Syndicated Linux News 0 03-12-2008 10:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 05:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration