Results 1 to 2 of 2
Hi I have attempted to setup my own mail server using centos, postfix and dovecot.
(I have had to swap the 'at' symbol for the # so that I could ...
- 05-10-2011 #1Just Joined!
- Join Date
- May 2011
- Posts
- 2
Unable to send mail with postfix and dovecot. Log appears to have sent
Hi I have attempted to setup my own mail server using centos, postfix and dovecot.
(I have had to swap the 'at' symbol for the # so that I could get this post through the censoring)
I first for mail working (sending and receiving) using system users for the mail accounts however after some careful thought I have decided that virtual mailboxes are the way to go.
Since moving to the virtual mailbox setup I am unable to send outgoing mail. I can receive mail correctly but cannot send.
I can also send between email addresses on my domain eg news#mydomain.com to my.name#mydomain.com
I think switching to virtual mailboxes has broken something in the auth but I cant see anything in the logs and I have enabled verbose logging.
Orginally i set in main.cf the value mydomain = mydomain.com however I read that this shouldn't be the setting virtual_mailbox_domains so I commented the mydomain line out. I think the issue stems from this but I am not sure :S
Really tried my best on this one but would love it if anyone had any advice?
Here is my configs and and error log postings sorry in advance for all the info.
postconf -n output
================================================== =================
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
myhostname = localhost
mynetworks = 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
recipient_delimiter = +
relay_domains =
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
unknown_local_recipient_reject_code = 550
virtual_gid_maps = static:505
virtual_mailbox_base = /var/mail/vmail
virtual_mailbox_domains = example.com
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 100
virtual_uid_maps = static:506
dovecot -n output
================================================== ===================
# 1.0.7: /etc/dovecot.conf
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
mail_location: maildir:/var/mail/vmail/%d/%n
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
auth default:
mechanisms: plain cram-md5
verbose: yes
debug: yes
debug_passwords: yes
passdb:
driver: passwd-file
args: /etc/dovecot/passwd
passdb:
driver: pam
userdb:
driver: passwd-file
args: /etc/dovecot/users
socket:
type: listen
client:
path: /var/spool/postfix/private/auth
mode: 432
user: postfix
group: postfix
/etc/dovecot/passwd content
================================================== ====================
news#example.com:{PLAIN}AG5ld3NAYW5nZWxlY29tbWVyY2 UuY28udWsARmxlZXQ3MA==
info#example.com:{PLAIN}AG5ld3NAYW5nZWxlY29tbWVyY2 UuY28udWsARmxlZXQ3MA==
my.name#example.com:{HMAC-MD5}b5a87b62680a48250e68c137060389a12176d5c21cd9d0 0f82fd2fcc1acce9f4
/etc/dovecot/users content
================================================== ====================
news#example.com::506:505::/var/mail/vmail/example.com/:/bin/false::
info#example.com::506:505::/var/mail/vmail/example.com/:/bin/false::
my.name#example.com::506:505::/var/mail/vmail/example.com/:/bin/false::
/etc/postfix/vmailbox content
================================================== ====================
my.name#example.com example.com/my.name/
info#example.com example.com/info/
news#example.com example.com/news/
/var/log/maillog last 20 lines after trying to login
================================================== ====================
May 10 13:49:44 ds-49372 postfix/smtpd[12472]: connect from cpc2-brad19-2-0-cust447.barn.cable.virginmedia.com[94.171.145.192]
May 10 13:49:44 ds-49372 dovecot: auth(default): client in: AUTH 3 PLAIN service=smtp resp=AG5ld3NAYW5nZWxlY29tbWVyY2UuY28udWsARmxlZXQ3M A==
May 10 13:49:44 ds-49372 dovecot: auth(default): passwd-file(news#example.com): lookup: user=news#example.com file=/etc/dovecot/passwd
May 10 13:49:44 ds-49372 dovecot: auth(default): client out: OK 3 user=news#example.com
May 10 13:49:44 ds-49372 postfix/smtpd[12472]: 239C6B3016F: client=cpc2-brad19-2-0-cust447.barn.cable.virginmedia.com[94.171.145.192], sasl_method=PLAIN, sasl_username=news#example.com
May 10 13:49:44 ds-49372 postfix/cleanup[12489]: 239C6B3016F: message-id=<4DC9348C.4070604#example.com>
May 10 13:49:44 ds-49372 postfix/qmgr[12101]: 239C6B3016F: from=<news#example.com>, size=19672, nrcpt=1 (queue active)
May 10 13:49:44 ds-49372 postfix/smtpd[12472]: disconnect from cpc2-brad19-2-0-cust447.barn.cable.virginmedia.com[94.171.145.192]
May 10 13:49:47 ds-49372 dovecot: IMAP(news#example.com): Connection closed
May 10 13:49:48 ds-49372 postfix/smtp[12491]: 239C6B3016F: to=<pete#e-titans.com>, relay=e-titans.com[74.220.202.13]:25, delay=3.9, delays=0.25/0/0.7/2.9, dsn=2.0.0, status=sent (250 OK id=1QJmOX-0004LR-Vx)
May 10 13:49:48 ds-49372 postfix/qmgr[12101]: 239C6B3016F: removed
- 05-10-2011 #2Just Joined!
- Join Date
- May 2011
- Posts
- 2
I appear to have fixed it by going back to the main.cf and then removing the line myhostname = localhost as it appeared to be sending from localhost which broke it.
Removing it left it set as my proper hostname which was configured in the master.cf i believe.
Does this seem like the correct solution? I know it works but I would like to see if it is correct.


Reply With Quote