LAMP Stack script install emails go out, disappear coming in

I need to be able to receive email at brian@brianthedell.com (sending from it would be nice too, but isn't mandatory). I can send out mail using mutt (it comes as sent from brian@hashbowl.brianthedell.com), and my Wordpress installation can send out mail. I cannot RECEIVE mail, though; I send mail to brian@brianthedell.com (OR to brian@hashbowl.brianthedell.com) from an independant gmail account and it just disappears into nowhere, no error messages, nothing. I'd consider using gmail on the brianthedell.com domain, but my Wordpress there needs to be able to send out email. Here's what I've been doing:

First, when I setup my Linode I installed the LAMP Stack Script, and configured it with a MySQL database for a Wordpress installation. I had to do everything funky for apache2, since I'm hosing two sites off one IP, but everything is working just fine. ANYWAY, here is my server:

hashbowl and hashbowl.brianthedell.com << mail, web, everything (I have no FTP)

This is how my DNS has been setup (brianthedell.com is pointed to the Linode nameservers):

A/AAAA Records

Host Name IP Address TTL Edit Remove

173.255.218.105 Default Edit Remove

www 173.255.218.105 Default Edit Remove

mail 173.255.218.105 Default Edit Remove

hashbowl 173.255.218.105 Default Edit Remove

MX Records

Mail Server Preference Subdomain TTL Edit Remove

hashbowl.brianthedell.com 10 Default Edit Remove

Next, I followed this:

Basic Postfix Email Gateway on Ubuntu 10.04 (Lucid)

found at http://library.linode.com/email/postfix … 0.04-lucid">http://library.linode.com/email/postfix/gateway-ubuntu-10.04-lucid

Now, I didn't install Postfix as per the instructions here; Postfix was already installed and configured as part of the LAMP stack; I wonder if this is the source of my troubles?

My /etc/postfix/main.cf includes these entries, as per the directions:

myhostname = hashbowl

alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases

mydestination = localhost, li228-105.members.linode.com, localhost.members.linode.com, localhost

relayhost =

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

mailboxsizelimit = 0

recipient_delimiter = +

inet_interfaces = loopback-only

virtualaliasmaps = hash:/etc/postfix/virtual

home_mailbox = mail/

At this point the directions ask to reload and restart Postfix, which I did. In fact, I've since rebooted my machine, but anyway. Here is my /etc/postfix/virtual:

brian@brianthedell.com brian.thedell@gmail.com, brian

brian@hashbowl.brianthedell.com brian

The file virtual HAS been mapped into a virtual.db file. Finally, ~/mail was added to my /etc/skel and all my users (currently only root and brian) have /mail directories in their home directories. Any kind soul willing to point out what I'm doing wrong?

8 Replies

Basic connectivity test – fail

telnet hashbowl.brianthedell.com 25
Trying 173.255.218.105...
telnet: connect to address 173.255.218.105: Connection refused
telnet: Unable to connect to remote host

Can't connect to the SMTP port on your mail server.

@thebrian:

inet_interfaces = loopback-only

You probably want "inet_interfaces = all", since you can only receive mail from yourself right now.

I reran the configuration as root. The bottom of my main.cf now reads:

> # myhostname = li228-105.members.linode.com

myhostname = hashbowl.brianthedell.com

myhostname = hashbowl

alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases

mydestination = localhost, li228-105.members.linode.com, localhost.members.linode.com, localhost, brianthedell.com, hashbowl

mydestination = $myhostname localhost.$mydomain brianthedell.com

relayhost =

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

mailboxsizelimit = 6400000

recipient_delimiter = +

inet_interfaces = all

virtualaliasmaps = hash:/etc/postfix/virtual

home_mailbox = mail/

myorigin = /etc/mailname

inet_protocols = ipv4

…it still doesn't receive mail, but I guess I'm making progress? BTW, I'm just now getting funky error-mail-returned messages to test emails I sent out this morning…

thebrian,

May i suggest using google apps to handle your inbound mail. There is no cost for <50users, and it handles all of your spam filtering.

http://library.linode.com/email/google-mail/

I would… can Wordpress still send out emails, though? It kind of needs to be able to do that…

Yes you can leave postfix to handle outbound mail, and configure google apps for your inbound mail.

After repeatedly trying to get postfix working myself, this is what i ended up doing.

Alternatively, if you are determined to run your own mail server, try citadel, it installs with a minimum of fuss and config.

When I use mutt now, it sends from brian@brianthedell.com not brian@hashbowl.brianthedell.com which is good.

I CAN telnet into my mail server now! yay! Unfortunately, I cannot get it to send mail; RCPT TO:<brian.thedell@gmail.com> gets rejected with:
> 554 5.7.1 Relay access denied
:(

when I RCPT TO:<brian@brianthedell.com> it allows me to send it, but a getmail command still comes up empty with:
> SimplePOP3Retriever:brian@hashbowl.brianthedell.com:25:

getmailrc: operation error (POP error (220 hashbowl.brianthedell.com ESMTP Postfix (Ubuntu)))

0 messages (0 bytes) retrieved, 0 skipped

Here is the current state of my 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

smtpdusetls=yes

smtpdtlssessioncachedatabase = btree:${datadirectory}/smtpdscache

smtptlssessioncachedatabase = btree:${datadirectory}/smtpscache

See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for

information on enabling SSL in the smtp client.

myhostname = li228-105.members.linode.com

myhostname = hashbowl.brianthedell.com

myhostname = hashbowl

alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases

mydestination = localhost, li228-105.members.linode.com, localhost.members.linode.com, localhost, brianthedell.com, hashbowl

mydestination = $myhostname localhost.$mydomain brianthedell.com

relayhost =

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

mailboxsizelimit = 6400000

recipient_delimiter = +

inet_interfaces = all

virtualaliasmaps = hash:/etc/postfix/virtual

home_mailbox = mail/

myorigin = /etc/mailname

inet_protocols = ipv4

Just a note: my /var/spool/postfix/active directory has LOTS of entries in it…

I'm assuming that at this point, the server is accepting the mail as it should, and I'm just not finding the proper way to access it?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct