Linode Postfix configuration
I have followed exactly the following to setup postfix on ubuntu with gmail apps.
postfix/main.cf:
smtpdbanner = $myhostname ESMTP $mailname (Ubuntu)
biff = no
appending .domain is the MUA's job.
appenddotmydomain = no
Uncomment the next line to generate "delayed mail" warnings
delaywarningtime = 4h
readme_directory = no
TLS parameters
smtpdtlscert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpdtlskey_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpdtlssessioncachedatabase = btree:${datadirectory}/smtpdscache
smtptlssessioncachedatabase = btree:${datadirectory}/smtpscache
enable SASL authentication
smtpsaslauth_enable = yes
disallow methods that allow anonymous authentication.
smtpsaslsecurity_options = noanonymous
where to find sasl_passwd
smtpsaslpasswordmaps = hash:/etc/postfix/saslpasswd
Enable STARTTLS encryption
smtpusetls = yes
where to find CA certificates
smtptlsCAfile = /etc/ssl/certs/ca-certificates.crt
See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
information on enabling SSL in the smtp client.
smtpdrelayrestrictions = permitmynetworks permitsaslauthenticated deferunauth_destination
myhostname = allhealthy.co.uk
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = allhealthy.co.uk, localhost.co.uk, , localhost
relayhost = [smtp.gmail.com]:587
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailboxsizelimit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
etc/hosts:
127.0.0.1 allhealthy.co.uk localhost allhealthy
Following is not sending any mail. No error message in /var/log/mail.log /var/log/mail.err
sendmail
FROM:
SUBJECT: test
test
.
What is wrong?
Thx
CK
5 Replies
127.0.0.1 localhost
123.456.789.123 allhealthy.co.uk allhealthy
where the obviously faked IP 123.456.789.123 should be your own IP.
The DNS settings on Linode:
MX Records
Mail Server Preference Subdomain TTL Options
ALT2.ASPMX.L.GOOGLE.COM 5 300 (5 minutes) Edit | Remove
ALT1.ASPMX.L.GOOGLE.COM 5 300 (5 minutes) Edit | Remove
ALT3.ASPMX.L.GOOGLE.COM 10 Default Edit | Remove
I do not know what to do. At least I should get an error or some trace log of what is going on..
I even added the following to main.cf for debug messages.
debugpeerlevel = 2
debugpeerlist = mydomainhere
Thx for the help.
When I sent the mail, I get the following but still the mail is not reached at the destination:
Jun 12 10:21:25 allhealthy postfix/pickup[7651]: 0A21D340A1: uid=1000 from=
Jun 12 10:21:25 allhealthy postfix/qmgr[3180]: 0A21D340A1: from=<
Jun 12 10:21:25 allhealthy postfix/local[9611]: 0A21D340A1: to=<
Jun 12 10:21:25 allhealthy postfix/qmgr[3180]: 0A21D340A1: removed
I have even checked the spam of the "To" destination. No mail! By the way I am using Google Apps…
Thx a lot.
main.cf
smtpdrelayrestrictions = permitmynetworks permitsaslauthenticated deferunauth_destination
myhostname = allhealthy.co.uk
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost
relayhost = [smtp.gmail.com]:587
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailboxsizelimit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
etc/hosts
127.0.0.1 localhost
109.237.24.35 allhealthy.co.uk allhealthy localhost mail.allhealthy.co.uk
It's not exactly clear whether this applies to your situation here, but thought it might be a potential point of confusion.