I'm trying to set up a Dovecot and Postfix mailserver. My wishes for the server:
- IMAPS
- SMTP (secure if is it an option?)
- Both IMAPS and SMTP must require an user from MySQL, same table.
- Mails are stored as maildir in /home/mail/domain/account
That's it so far I think, however I succeeded to mess something somewhere. Right now I'm stuck at receiving mails, which I believe is the first part.
I get this this in mail.
Sep 1 22:04:38 Debian-60-squeeze-64-minimal postfix/smtpd[9490]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 1 22:04:38 Debian-60-squeeze-64-minimal postfix/smtpd[9490]: connect from xxx.yyy.dk[xx.xx.200.10]
Sep 1 22:04:38 Debian-60-squeeze-64-minimal dovecot: auth(default): new auth connection: pid=9490
Sep 1 22:04:39 Debian-60-squeeze-64-minimal postfix/smtpd[9490]: 06A5118F4F19: client=xxx.yyy.dk[xx.xx.200.10]
Sep 1 22:04:39 Debian-60-squeeze-64-minimal postfix/cleanup[9493]: 06A5118F4F19: message-id=<090BEFE4-DEE6-4A94-80F3-F9574044358E@yyy.dk>
Sep 1 22:04:39 Debian-60-squeeze-64-minimal postfix/qmgr[9342]: 06A5118F4F19: from=<zzz@yyy.dk>, size=11227, nrcpt=1 (queue active)
Sep 1 22:04:39 Debian-60-squeeze-64-minimal postfix/smtpd[9490]: disconnect from xxx.yyy.dk[xx.xx.200.10]
Sep 1 22:04:39 Debian-60-squeeze-64-minimal postfix/qmgr[9342]: warning: connect to transport private/dovecot: No such file or directory
Sep 1 22:04:39 Debian-60-squeeze-64-minimal postfix/error[9494]: 06A5118F4F19: to=<uuu@hhh.dk>, relay=none, delay=0.14, delays=0.13/0.01/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
This line in mail.warn
Sep 1 22:04:38 Debian-60-squeeze-64-minimal postfix/smtpd[9490]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Please, not just a link to a tutorial, have tried the whole day to figure this one out. Thanks.
I have this main.cnf
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
#delay_warning_time = 4h
myhostname = xxx.dk
myorigin = xxx.dk
mydestination = localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
# Virtual mailbox settings
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_base = /home/mail
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_minimum_uid = 5000
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
# SASL Authentication
smtpd_sasl_auth_enable = yes
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
message_size_limit = 30720000
virtual_alias_domains =
smtpd_sasl_authenticated_header = yes
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_maildir_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
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 $send$
This is the relevant line in master.cf I think
maildrop unix - n n - - pipe
flags=DRhu user=mail argv=/usr/lib/dovecot/deliver -d ${recipient}
This happens if I execute /usr/lib/dovecot/deliver
I think I can execute it.
# /usr/lib/dovecot/deliver
Fatal: destination user parameter (-d user) not given
Or
# /usr/lib/dovecot/deliver -d emil
(nothing happens then).
Neither cases provided any folders in /home/mail
Best Answer
The NIS error is irrelevant. You likely have an entry
nis
in yourpostfix/dynamicmaps.cfg
, which you can remove/comment out because you are not using NIS (I hope).What happens with your mail is that Postfix can't connect to your Dovecot server. What is the relevant line in your
postfix/master.cfg
?