Google Apps Email on Ubuntu 12.04 Linode

Hello All,

Have managed to configure my linode to send and receive emails through Google Apps Email but not quite 100% there, was hoping someone could point me in the right direction?

The only thing that isn't working correctly is the emails that are generated by some of the plugins operating on my website.

When the email is sent, it is sent via: Live.Free.Die.Travelling@(servername).livefreedietravelling.com

as a result the emails are being filtered as spam.

I would like to have the emails sent from: (defaultusername)@livefreedietravelling.com

This is my first time using both Google Apps for Email and adjusting my email configurations so apologies if this is easy stuff, I can't quite work it out.

My DNS configuration can be found in screenshot and link below (I suspect this is where something is wrong?):

http://snag.gy/OXbzY.jpg

Again, thanks to anyone that can provide a bit of help on this one.

Regards,

Paul

![](" />

10 Replies

You censored the ip addresses, yet gave us the domain name.

You…do know what DNS is for, right?

HA!

Yeah, wasn't thinking… nevermind.

Don't suppose you could offer any help on the problem could you?

Thanks,

Paul

What is your application using as its From: address?

Do you have a copy of the headers of one of the messages in question?

Application email address is set to send as exampleemail@livefreedietravelling.com but for some reason it doesn't send as that.

Header, Sure thing…

![](" />

Try adding the sendmail -f parameter in your php mail script to the from address. See http://uk1.php.net/manual/en/function.mail.php

Another option would be to send via SMTP through google but then you maybe hit by google's sending limit.

Hi Obs,

Thanks for that suggestion, I edited my php.ini file as below, mail is sending but still with the original problem.

Any other ideas?

sendmail_path = "/usr/sbin/sendmail -t -i -fXXXXXX@livefreedietravelling.com"

Does my A/AAAA Record, hostname: 'mail' have anything to do with this?

Thanks,

Paul

DNS doesn't have much to do with this; it's entirely up to your application to send the correct From: header when sending mail. (Or, more specifically, it's up to PHP to let you change that.)

Why do you think the -f over-ride is not working then?

It looks like you're using Sendmail-brand SENDMAIL™, which I've not used in quite awhile. But, at least with Exim-brand sendmail, it does work OK. (See snippets below.)

You might want to check your mail log (usually /var/log/mail.log or thereabouts) to see if it is reporting any errors; it's possible that your application is running as a user which isn't allowed to use the -f option, and it should log about that. Alternatively, you might be editing the wrong php.ini file: it loads different files depending on whether you're using command line php, mod_php, or PHP-FPM.

If you try 'sendmail -t -i -f…@…' from the command line, that would at least eliminate the MTA itself as a problem (but it could still be disallowing -f for other users); it'll sit and await your input, which should consist of a few headers (most importantly, To:), followed by one blank line, followed by a message, and then followed by ctrl-D on a line of its own. Then, you can check what comes out the other end.

rtucker@witte:~$ sendmail -t -i
Subject: test message 1
To: rtucker@gmail.com
X-Test: test header 1

this is with the default
Delivered-To: rtucker@gmail.com
Received: by 10.182.103.198 with SMTP id fy6csp168424obb;
        Sat, 12 Jan 2013 07:32:32 -0800 (PST)
X-Received: by 10.236.147.204 with SMTP id t52mr89426823yhj.9.1358004752654;
        Sat, 12 Jan 2013 07:32:32 -0800 (PST)
Return-Path: <rtucker@sodtech.net>Received: from framboise.hoopycat.com (framboise.cdknnjln.sodtech.net. [2600:3c03::f03c:91ff:fe96:1dc9])
        by mx.google.com with ESMTP id u19si4044443anh.133.2013.01.12.07.32.32;
        Sat, 12 Jan 2013 07:32:32 -0800 (PST)
Received-SPF: pass (google.com: best guess record for domain of rtucker@sodtech.net designates 2600:3c03::f03c:91ff:fe96:1dc9 as permitted sender) client-ip=2600:3c03::f03c:91ff:fe96:1dc9;
Authentication-Results: mx.google.com;
       spf=pass (google.com: best guess record for domain of rtucker@sodtech.net designates 2600:3c03::f03c:91ff:fe96:1dc9 as permitted sender) smtp.mail=rtucker@sodtech.net
Received: from witte.rochnyav.sodtech.net (unknown [IPv6:2001:470:8dde:2:b456:7b95:74a7:8068])
    by framboise.hoopycat.com (Postfix) with ESMTPS id 4A885804A
    for <rtucker@gmail.com>; Sat, 12 Jan 2013 15:32:32 +0000 (UTC)
Received: from rtucker by witte.rochnyav.sodtech.net with local (Exim 4.71)
    (envelope-from <rtucker@witte.rochnyav.sodtech.net>)
    id 1Tu348-0004g7-JW
    for rtucker@gmail.com; Sat, 12 Jan 2013 10:32:26 -0500
Date: Sat, 12 Jan 2013 10:32:22 -0500
Message-Id: <e1tu348-0004g7-jw@witte.rochnyav.sodtech.net>Subject: test message 1
To: rtucker@gmail.com
X-Test: test header 1
From: Ryan Tucker <rtucker@sodtech.net>this is with the default</rtucker@sodtech.net></e1tu348-0004g7-jw@witte.rochnyav.sodtech.net></rtucker@witte.rochnyav.sodtech.net></rtucker@gmail.com></rtucker@sodtech.net> 
rtucker@witte:~$ sendmail -t -i -frtucker@hoopycat.com
Subject: test message 2
To: rtucker@gmail.com
X-Test: test header 2

this is with a forced from address
Delivered-To: rtucker@gmail.com
Received: by 10.182.103.198 with SMTP id fy6csp168439obb;
        Sat, 12 Jan 2013 07:32:58 -0800 (PST)
X-Received: by 10.101.136.11 with SMTP id o11mr21584144ann.26.1358004778297;
        Sat, 12 Jan 2013 07:32:58 -0800 (PST)
Return-Path: <rtucker@hoopycat.com>Received: from framboise.hoopycat.com (framboise.cdknnjln.sodtech.net. [2600:3c03::f03c:91ff:fe96:1dc9])
        by mx.google.com with ESMTP id b70si9185183yhe.134.2013.01.12.07.32.58;
        Sat, 12 Jan 2013 07:32:58 -0800 (PST)
Received-SPF: pass (google.com: domain of rtucker@hoopycat.com designates 2600:3c03::f03c:91ff:fe96:1dc9 as permitted sender) client-ip=2600:3c03::f03c:91ff:fe96:1dc9;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of rtucker@hoopycat.com designates 2600:3c03::f03c:91ff:fe96:1dc9 as permitted sender) smtp.mail=rtucker@hoopycat.com
Received: from witte.rochnyav.sodtech.net (unknown [IPv6:2001:470:8dde:2:b456:7b95:74a7:8068])
    by framboise.hoopycat.com (Postfix) with ESMTPS id 06544804A
    for <rtucker@gmail.com>; Sat, 12 Jan 2013 15:32:58 +0000 (UTC)
Received: from rtucker by witte.rochnyav.sodtech.net with local (Exim 4.71)
    (envelope-from <rtucker@hoopycat.com>)
    id 1Tu34d-0004gO-Aj
    for rtucker@gmail.com; Sat, 12 Jan 2013 10:32:57 -0500
Date: Sat, 12 Jan 2013 10:32:53 -0500
Message-Id: <e1tu34d-0004go-aj@witte.rochnyav.sodtech.net>Subject: test message 2
To: rtucker@gmail.com
X-Test: test header 2
From: Ryan Tucker <rtucker@hoopycat.com>this is with a forced from address</rtucker@hoopycat.com></e1tu34d-0004go-aj@witte.rochnyav.sodtech.net></rtucker@hoopycat.com></rtucker@gmail.com></rtucker@hoopycat.com> 

Hi hoopycat,

thanks so much for your post, really helped!

I've managed to configure my wordpress site using an SMTP plugin (http://wordpress.org/extend/plugins/wp-smtp/) figured it might be useful for someone to know.

Thanks again and take care,

Paul

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