Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have my webserver set up to send out email as a smartserver using postfix and it does not allow any other machines on my network to send mail through it. I've been able to send email from my webserver to any address I like and it still works like that.

But I want to change the fact that postfix refuses all clients on the local LAN. I want my desktop PC to be able to send out email through my webserver, but I can't get past these log messages:

Aug 13 21:58:01 localserver postfix/smtpd[21838]: connect from diablo[2001:980:1b7f:1:d568:1d76:bc9a:e356]
Aug 13 21:58:05 localserver postfix/smtpd[21838]: disconnect from diablo[2001:980:1b7f:1:d568:1d76:bc9a:e356]

I tried adding the IPv6 address to the mynetworks line in main.cf, but it doesn't solve the issue.

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

append_dot_mydomain = no

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/ssl/certs/ssl-mail.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-mail.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

myhostname = localserver.local
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = some.server.nl., localserver.local, localhost.local, localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/dovecot-auth
smtpd_sasl_authenticated_header = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sender_restrictions = reject_unknown_sender_domain
mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/conf.d/01-mail-stack-delivery.conf -n -m "${EXTENSION}"
smtp_use_tls = yes
smtpd_tls_received_header = yes
smtpd_tls_mandatory_protocols = SSLv3, TLSv1
smtpd_tls_mandatory_ciphers = medium
smtpd_tls_auth_only = yes
tls_random_source = dev:/dev/urandom

Hints/tips anyone?

share|improve this question
add comment

2 Answers

Works fine for me on my production mail server, but Postfix seems to want the netmask on IPv6 addresses. For instance:

[2001:980:1b7f:1:d568:1d76:bc9a:e356]/128

or, since your privacy address will probably change by the time you read this:

[2001:980:1b7f:1::]/64
share|improve this answer
add comment

The IPv6 address listed in mynetworks doesn't match the one the error is mentioning. So that might be it.

Although I would discourage blanket whitelisting with mynetworks. Instead move permit_sasl_authenticated highest in smtpd_recipient_restrictions and send via authenticated SMTP. Then you can send from any IP (v4 or v6).

share|improve this answer
    
The IP isn't in there because it didn't work, so I removed it. I'll have to try your tip later today. –  jippie Aug 14 '12 at 6:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.