Post Fix Set-Up Issues
My A Record point to my linode's IP and my website works.
My MX record currently looks like:
10 @ mydomain.com
0 @ smtp.secureserver.net
I opened a ticket and they said that my two lines:
postconf -e 'myhostname = server.yourdomain.com'
postconf -e 'mydestination = server.yourdomain.com, localhost, localhost.localdomain'
Were wrong - so I fixed that. They also said that they used telnet to test my mail server.
How would one do this to make sure I fixed the issue?
Also, I am using a mail client (simple mail plugin for firefox). I have
POP3 mydomain.com port 110
login: user+mydomain.com
SMTP mydomain.com port 26
login: user+mydomain.com
Is this correct? I guess the better question is how can I find out if this is correct?
6 Replies
@Smithers:
How would one do this to make sure I fixed the issue?
Google "telnet mail server" for examples.
> Is this correct? I guess the better question is how can I find out if this is correct?
Depending on your sasl backend and config, it could be + or @. I use Dovecot, both for POP3 and SMTP auth (sasl backend to postfix), and with that I use full email as username (@). Also, test by trying it out.
Try sending email without authorizing (say, via telnet) to a domain not hosted on your server to see if you have open relay.
BTW, smtp should be at port 25.
Well I tried telnetting to mydomain.com port 25 and all I got was a blank screen so I suppose that means it's still not working properly.
I can telnet localhost 25 as root and although it comes up it doesn't look like it does here (
When I do port 110 I get a +OK hello there. Not sure if that's even relevent…
I used port 26 because that's how all my other sites (hosted on cpanel shared hosting) have been set-up. But port 25 still doesn't work (see above).
Any suggestions on how to proceed?
If you can't telnet to port 25 from outside, but it does work locally, it means either postfix is listening on wrong IP, does not listen at all, or you have a firewall blocking port 25.
If you get +OK @ 110, it means your POP3 server (which is not postfix) is accepting connections.
Can you post or pastebin the output of postconf -n (redact any private data, like your domain name if you wish)? I'm not an expert with Postfix, but I can do get one configured for my purposes (virtual addresses), and I'll try to help, but the output will certainly be of use to someone who can recognize your problem at once.
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
appenddotmydomain = no
biff = no
brokensaslauth_clients = yes
config_directory = /etc/postfix
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
mailboxsizelimit = 0
messagesizelimit = 30720000
mydestination = mydomain.com, localhost, localhost.localdomain
myhostname = mydomain.com
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
proxyreadmaps = $localrecipientmaps $mydestination $virtualaliasmaps $virtualaliasdomains $virtualmailboxmaps $virtualmailboxdomains $relayrecipientmaps $relaydomains $canonicalmaps $sendercanonicalmaps $recipientcanonicalmaps $relocatedmaps $transportmaps $mynetworks $virtualmailboxlimit_maps
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
relayhost =
smtptlssessioncachedatabase = btree:${datadirectory}/smtpscache
smtpdbanner = $myhostname ESMTP $mailname (Ubuntu)
smtpdrecipientrestrictions = permitmynetworks, permitsaslauthenticated, rejectunauth_destination
smtpdsaslauth_enable = yes
smtpdsaslauthenticated_header = yes
smtpdtlscert_file = /etc/postfix/smtpd.cert
smtpdtlskey_file = /etc/postfix/smtpd.key
smtpdtlssessioncachedatabase = btree:${datadirectory}/smtpdscache
smtpdusetls = yes
virtualaliasdomains =
virtualaliasmaps = proxy:mysql:/etc/postfix/mysql-virtualforwardings.cf, mysql:/etc/postfix/mysql-virtualemail2email.cf
virtualgidmaps = static:5000
virtualmailboxbase = /home/vmail
virtualmailboxdomains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtualmailboxmaps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtualuidmaps = static:5000
Google Apps is free for 50 users or less, has excellent built in spam filtering, can be accessed via pop3, imap4, or secure webmail, and each mailbox has 7 gig of space, AND you get Google Doc's built-in for document sharing.
I haven't run my own mailserver for small domains for several years since Google Apps came out (of course we still do for bigger inhouse servers and those that need a intranet as well as internet mail solution).
Besides not having to install/configure/manage/monitor it (and you definately don't want a unsecured mail server - it will get your IP and maybe your Linode neighbors IP blacklisted in a minute) it doesn't eat up any space or bandwidth on your VPS.
So take a peek, it might save you a lot of headaches.