Linode Forum
https://forum.linode.com/

LAMP Stack script install emails go out, disappear coming in
https://forum.linode.com/viewtopic.php?f=11&t=6278
Page 1 of 1

Author:  thebrian [ Wed Nov 17, 2010 6:05 pm ]
Post subject:  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

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
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
virtual_alias_maps = 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?

Author:  waldo [ Wed Nov 17, 2010 6:36 pm ]
Post subject: 

Basic connectivity test -- fail

Code:
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.

Author:  hoopycat [ Wed Nov 17, 2010 7:04 pm ]
Post subject:  Re: LAMP Stack script install emails go out, disappear comin

thebrian wrote:
inet_interfaces = loopback-only


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

Author:  thebrian [ Wed Nov 17, 2010 8:13 pm ]
Post subject: 

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

Quote:
# 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
mailbox_size_limit = 6400000
recipient_delimiter = +
inet_interfaces = all

virtual_alias_maps = 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...

Author:  fiat [ Wed Nov 17, 2010 8:39 pm ]
Post subject: 

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/

Author:  thebrian [ Wed Nov 17, 2010 8:45 pm ]
Post subject: 

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

Author:  fiat [ Wed Nov 17, 2010 9:45 pm ]
Post subject: 

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.

Author:  thebrian [ Wed Nov 17, 2010 10:25 pm ]
Post subject:  I've got some settings right...

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:
Quote:
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:
Quote:
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

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

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.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

# 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
mailbox_size_limit = 6400000
recipient_delimiter = +
inet_interfaces = all

virtual_alias_maps = hash:/etc/postfix/virtual
home_mailbox = mail/
myorigin = /etc/mailname
inet_protocols = ipv4

Author:  thebrian [ Wed Nov 17, 2010 10:50 pm ]
Post subject: 

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?

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/