Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-26-2010, 11:57 AM
|
#1
|
LQ Newbie
Registered: Apr 2010
Posts: 8
Rep:
|
Send domain mail to offsite/external host from the webhost using sendmail Plesk 9
Hello all,
I am managing a Fedora dedicated server with Plesk 9 and just recently moved the email for one of the domains on the server to Google Apps for business. Unfortunately, I cannot get email messages from the website forms to deliver to addresses on this domain. For anyone familiar with Plesk, I have disabled mail in the hosting settings by un-checking the "Activate mail service on domain" checkbox and there are no accounts in the domain. (Other readings have indicated that this should be enough to allow mail to be directed to the appropriate server). My MX records correctly point to the google apps mail server.
I'm quite comfortable with command line, but I know almost nothing about the sendmail program or its alternatives and my attempts at researching how to set up this relay has been futile. I'm pretty sure I'm using sendmail and not qmail or anything else from what the red-hat style "alternatives" symlinks point to.
Oh, I've also checked the /etc/mail/access, domaintable, mailertable, sendmail.cf, virtusertable, local-host-names, sendmail.cf, and submit.cf and most of these files are empty (except the .cf files), and the sendmail.cf and submit.cf make no reference to the domain in question.
If it's of any help in resolving this problem, here is the output from a sendmail test that was was not received. (private data ommitted of course)
sendmail -v xxx@yyy.com
test email from yyy.com webserver. please ignore.
.
xxx@yyy.com... Connecting to [127.0.0.1] via relay...
220 my.server.com ESMTP
>>> EHLO my.server.com
250-my.server.com
250-STARTTLS
250-PIPELINING
250 8BITMIME
>>> STARTTLS
220 ready for tls
>>> EHLO my.server.com
250-my.server.com
250-PIPELINING
250 8BITMIME
>>> MAIL From:<root@my.server.com>
250 ok
>>> RCPT To:<xxx@yyy.com>
>>> DATA
250 ok
354 go ahead
>>> .
250 ok 1272296384 qp 10639
xxx@yyy.com... Sent (ok 1272296384 qp 10639)
Closing connection to [127.0.0.1]
>>> QUIT
Performing the same test and sending an email to a non-hosted domain works fine.
Any help would be greatly appreciated and I would love you forever.
Thanks,
Nathan
|
|
|
04-26-2010, 01:04 PM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,216
|
Hi,
Since /etc/mail/local-host-names is empty, you can use /etc/mail/mailertable to redirect mail to gmail:
Code:
yyy.com esmtp:mail.google.com
Of course you have to change mail.google.com with the actual google apps mail server.
After editing mailertable you have to run:
Code:
makemap hash /etc/mail/mailertable < /etc/mail/mailertable
Regards
|
|
|
04-26-2010, 01:16 PM
|
#3
|
LQ Newbie
Registered: Apr 2010
Posts: 8
Original Poster
Rep:
|
Thank you for the quick response! I added that line with the correct domain name and google mail server, ran the makemap command as shown, but nothing seems to have changed. Do I have to restart any services? The verbose output from sendmail -v xxx@yyy.com still only showed my server in the connection output, nowhere did I see the google mail server. Needless to say I never received the message at the destination email.
|
|
|
04-26-2010, 01:59 PM
|
#4
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,216
|
You don't need to restart sendmail, even though a restart does no harm
Anyway, what is the output of:
Code:
sendmail -bv user@yyy.com
dig mx yyy.com
|
|
|
04-26-2010, 04:15 PM
|
#5
|
LQ Newbie
Registered: Apr 2010
Posts: 8
Original Poster
Rep:
|
The output looks promising
Code:
[root@XXXX ~]# sendmail -bv xxx@yyy.com
xxx@yyy.com... deliverable: mailer esmtp, host mydomain.com.s9a1.psmtp.com, user xxx@yyy.com
[root@nnl069 mail]# dig mx yyy.com
; <<>> DiG 9.5.0-P2 <<>> mx yyy.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3328
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 1, ADDITIONAL: 6
;; QUESTION SECTION:
;yyy.com. IN MX
;; ANSWER SECTION:
yyy.com. 63896 IN MX 30 ASPMX3.GOOGLEMAIL.com.
yyy.com. 63896 IN MX 10 ASPMX.L.GOOGLE.com.
yyy.com. 63896 IN MX 20 ALT1.ASPMX.L.GOOGLE.com.
yyy.com. 63896 IN MX 20 ALT2.ASPMX.L.GOOGLE.com.
yyy.com. 63896 IN MX 30 ASPMX2.GOOGLEMAIL.com.
;; AUTHORITY SECTION:
yyy.com. 63896 IN NS ns.yyy.com.
;; ADDITIONAL SECTION:
ASPMX.L.GOOGLE.com. 244 IN A 74.125.113.27
ALT1.ASPMX.L.GOOGLE.com. 193 IN A 209.85.229.27
ALT2.ASPMX.L.GOOGLE.com. 193 IN A 209.85.129.114
ASPMX2.GOOGLEMAIL.com. 1968 IN A 209.85.135.27
ASPMX3.GOOGLEMAIL.com. 2388 IN A 72.14.213.27
ns.yyy.com. 63896 IN A 206.248.146.145
;; Query time: 25 msec
;; SERVER: 216.139.240.43#53(216.139.240.43)
;; WHEN: Mon Apr 26 16:05:02 2010
;; MSG SIZE rcvd: 271
The mydomain.s9a1.psmtp.com is the highest priority mx server stored locally on the server for our google apps postini mail server while the a*.google*.com servers are what's currently stored in our registrar's dns, but google will receive mail on either one. (We're going to be transferring domain ownership as soon as we get this mail issue sorted, hence why the local mx records don't match the 'live' records. The records did match a few days ago and the mail wasn't sending then)
|
|
|
04-26-2010, 05:58 PM
|
#6
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,216
|
Hi,
If mydomain.com.s9a1.psmtp.com knows how to handle mail for xxx@yyy.com, I guess it works.
You should try to send an email and watch /var/log/maillog to see what happens
|
|
|
04-27-2010, 09:15 AM
|
#7
|
LQ Newbie
Registered: Apr 2010
Posts: 8
Original Poster
Rep:
|
Sorry to bug you again,
but I watched /var/log/maillog, and all the date-stamped maillog files in the /var/log folder, but they are all empty. I'm not sure if loggin is disabled for mail, or how to go about enabling it if it is, but I still can't receive mail from the server on this domain. I also made sure that the server's ip was set as an incoming gateway to prevent it from being blocked by google, but still nothing. Any other suggestions for me? So far you've been much more helpful than my server host.
|
|
|
04-27-2010, 09:36 AM
|
#8
|
LQ Newbie
Registered: Apr 2010
Posts: 8
Original Poster
Rep:
|
Good news! This morning's email went through, it just got picked up as spam! Bathroy, you rule! As a king of men, or at the very least, linux servers. Thank you
|
|
|
04-27-2010, 02:21 PM
|
#9
|
LQ Newbie
Registered: Apr 2010
Posts: 8
Original Poster
Rep:
|
Okay, another question for ya. Email is sending from the server to real accounts as expected now, all thanks to you. But aliases such as info@domain.com are not directing email to the address it should and I'm trying to figure out on which end this problem is happening. (Sending from my own mail account to this alias works) I'm thinking google, but I just wanted to confirm before I open a ticket with google. I'm interpretting the output of this sendmail -bv command to mean that my server seems to be finding that alias on my domain so shouldn't be having any problems directing mail to it.
Code:
[root@place ~]# sendmail -bv info@domain.com
info@domain.com... deliverable: mailer esmtp, host aspmx.l.google.com, user info@domain.com
Thanks again!
|
|
|
04-27-2010, 04:05 PM
|
#10
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,216
|
Hi,
The output of sendmail -bv ... means that your server knows that it has to deliver the mail for info@domain.com to aspmx.l.google.com. Then it's up to aspmx.l.google.com to deliver. So I guess you have to contact them.
Btw, from what I've read, the mail logs for plesk could be located at /usr/local/psa/var/log/maillog, so you can look there for hints on this.
Regards
|
|
|
04-27-2010, 04:17 PM
|
#11
|
LQ Newbie
Registered: Apr 2010
Posts: 8
Original Poster
Rep:
|
Okay, thanks again for all the help. I'll check out that log and get in touch with google to figure out what's going on. Thanks!
Nathan
|
|
|
12-07-2010, 08:16 AM
|
#12
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
What was Google's answer? -- A brand new Postini admin. wants to know.
TIA
|
|
|
03-13-2011, 08:00 AM
|
#13
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
natern,
Did you ever hear from Google?
|
|
|
All times are GMT -5. The time now is 06:46 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|