Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Oct 18, 2012 5:05 am 
Offline
Newbie

Joined: Sun Nov 08, 2009 6:06 am
Posts: 4
Hi all linoders!

I have a question that may seem simple for you all, but I am stuck a little.
I had a wordpress installation on my linode, used msmtprc for sending mail. The domain itself was at google apps and I had no problem receiving emails.
What happened next is I started growing and offered wordpress sites for my clients, friends, etc. (domains pointed using virtual directories).

It all works, but emails sent are only from the single address in my msmtprc config file.

As far as I understand, I need to start using postfix or other software for the server to start sending emails.

What would be the solutions easiest in setup and usage? If postfix, then how do I use that for all my wordpress installations?

Thanks for bearing with my questions :)


Top
   
PostPosted: Fri Oct 19, 2012 12:34 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
Postfix can do this fine. You'll set it up like a normal internet mail host, then make a few configuration changes so that it doesn't accept mail from outside. In main.cf, set:
Code:
myorigin = $mydomain
inet_interfaces = loopback-only
local_transport = error:local delivery is disabled

In master.cf, you would comment out the entry for the local delivery agent. Don't bother with installing Dovecot or Courier since you're not handling local mail.

Exim can do this also.

In either case, you need to remove msmtp before installing Postfix or Exim.

You may also look into configuring msmtp to use different account configurations for different sites.


Top
   
PostPosted: Mon Oct 22, 2012 5:04 am 
Offline
Newbie

Joined: Sun Nov 08, 2009 6:06 am
Posts: 4
Vance wrote:
Postfix can do this fine. You'll set it up like a normal internet mail host, then make a few configuration changes so that it doesn't accept mail from outside. In main.cf, set:
Code:
myorigin = $mydomain
inet_interfaces = loopback-only
local_transport = error:local delivery is disabled

In master.cf, you would comment out the entry for the local delivery agent. Don't bother with installing Dovecot or Courier since you're not handling local mail.

Exim can do this also.

In either case, you need to remove msmtp before installing Postfix or Exim.

You may also look into configuring msmtp to use different account configurations for different sites.


Thanx, Vance!
I removed msmtp, installed and configured Exim. Now it does send emails from command line, so things seem OK. But neither one wordpress installation now sends emails. Do I need to configure anything in Wordpress itself? Sorry for noob questions!


Top
   
PostPosted: Mon Oct 22, 2012 11:13 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
The file /usr/sbin/sendmail should exist on your system and be runnable by ordinary users. Try
Code:
/usr/sbin/sendmail -t -i <<EOT
To: me@example.org
Subject: simple test

This is only a test.
EOT

(substituting your own e-mail address) and see if this sends a test message to you.

BTW, it will be easier to provide help if you let us know what distribution and version you are running.


Top
   
PostPosted: Wed Oct 24, 2012 5:38 am 
Offline
Newbie

Joined: Sun Nov 08, 2009 6:06 am
Posts: 4
Yes, sorry, I am running Ubuntu 12.04.

I tried using sendmail - the file itself does exist, it allowed me to run the command you quoted, but no mail arrived.
So I believe that is about permissions for sendmail, right?


Top
   
PostPosted: Wed Oct 24, 2012 10:17 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
The mailq command will show the pending mail queue - see if your outgoing message is in there. Looking at /var/log/mail.log should tell you what happened to the test message.


Top
   
PostPosted: Thu Oct 25, 2012 9:21 am 
Offline
Newbie

Joined: Sun Nov 08, 2009 6:06 am
Posts: 4
Vance wrote:
The mailq command will show the pending mail queue - see if your outgoing message is in there. Looking at /var/log/mail.log should tell you what happened to the test message.


Mail gets frozen and this is what I get in the exim4 log:

Quote:
<root@liXXX-XX.members.linode.com>: Unrouteable address
2012-10-25 13:19:33 1TRNLR-0004l6-UG Frozen (delivery error message)


Really stuck here :(


Top
   
PostPosted: Thu Oct 25, 2012 11:45 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
I am not familiar with Exim so I can't offer detailed suggestions. However, I would imagine that your mail log file contains more entries that would be helpful. The line you posted appears to relate to local delivery failure of a status message. There should be other lines showing the fate of outgoing messages. (You sent your test message to an external address, right?)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group