| Linode Forum https://forum.linode.com/ |
|
| Feeling pretty dumb - need help with Postfix - 1/2 working https://forum.linode.com/viewtopic.php?f=11&t=6615 |
Page 1 of 1 |
| Author: | taysan [ Wed Jan 26, 2011 10:38 pm ] |
| Post subject: | Feeling pretty dumb - need help with Postfix - 1/2 working |
Ok, I've got a LAMP setup (using the terrific Linode guide) on Ubuntu/MySQL/Apache. I'm running an SMF forum on it and it's working great. I first tried SSMTP, using Google as an SMTP server to allow the forum to send mail. I managed to get that up and running, but then found out about the daily limit of 100 emails, and many of my 9000 members subscribe to email updates to forum threads etc. So I went the Postfix route, doing the basic install again using the Linode guide. Followed it letter for letter (I think). I disabled SSMTP (deleted the Google MX records, apt-get remove SSMTP etc. Even deleted my Google Apps account. Got Postfix up and running and the forum can send mail. Sweet! Now, my goal is to enable my email addresses at my domain (on my one Linode VPS). I don't need or want to store messages locally and use POP, I really just need it to forward the emails to my Google mail accounts. No matter what I do I can't get it working. I get an error message when sending mail: Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 554 554 5.7.1 <tim@domain.com>: Relay access denied (state 14). I've read and read and read but haven't seen a clear solution to this. I presume it's a combination of my main.cf and MX records etc. but just can't sort it and am looking for help. If someone offered a service to set Postfix up, I'd be a happy paying customer. Happy to post up whatever details needed, and I'm a humble man and not afraid of asking dumb questions. With no experience I've gotten this far, and feel pretty dumb that I can't clear this final hurdle. |
|
| Author: | Stever [ Thu Jan 27, 2011 9:50 am ] |
| Post subject: | |
First off, it sounds like your easiest option would be to go back to Google apps for receiving mail, and only using postfix on your linode to send your forum mail. Setting up a send-only postfix is pretty simple, and if you are just going to forward to google anyway... If you want us to help you troubleshoot your postfix, a real domain would let us check for the most obvious problems. Otherwise, log file excerpts from the failed delivery attempts and maybe a summary of main.cf would be a start. |
|
| Author: | taysan [ Thu Jan 27, 2011 12:42 pm ] |
| Post subject: | |
Wasn't sure the etiquette here of posting up my own domains (lots of the posts I've read seem to post up fictitious domains). It's www.dotheton.com for what its worth. I'll definitely have a look at using Postfix to only send mail - I guess I'd put the MX records back in for Google to receive mail for my domain there. I'll get my main.cf up here shortly too, although I think its a bit of a mess given all my attempts, using input from Postfix's setup guides as well as Linode's. |
|
| Author: | Stever [ Thu Jan 27, 2011 1:31 pm ] |
| Post subject: | |
Putting your real domain is always a slight risk, but without it all we can do is guess at your problems. It looks like you have your hostname set to dotheton.dotheton.com, and you are only set up to receive mail for that domain: Code: $ telnet mail.dotheton.com 25 Fixing the hostname is probably best done at the OS level, but you can hack it into main.cf by setting "myhostname". What are your main.cf settings for "mydestination", "virtual_alias_domains" and "virtual_mailbox_domains"? |
|
| Author: | taysan [ Thu Jan 27, 2011 2:36 pm ] |
| Post subject: | |
Thanks for the ongoing help - here's a bit more info: I initally set up the Postfix as per the Basic config outlined here: http://library.linode.com/email/postfix ... 0.04-lucid Including the Virtual Hosting configuration settings I've since likely made a mess of my main.cf. My MX Record: Mail Server mail.dotheton.com / Preference 10 / TTL Default A/AAAA Records: Hostname <blank> / IP Address 173.230.149.92 / TTL Default Hostname mail / IP Address 173.230.149.92 / TTL Default Hostname www / IP Address 173.230.149.92 / TTL Default CNAME Records - none TXT Records - None SRV Records - None main.cf: # See /usr/share/postfix/main.cf.dist for a commented, more complete version # Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is /etc/mailname. #myorigin = /etc/mailname 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. mydomain = dotheton.com myhostname = dotheton.dotheton.com alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = $mydomain mydestination = dotheton.dotheton.com, localhost.dotheton.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 = all relay_domains = $mydestination |
|
| Author: | Stever [ Thu Jan 27, 2011 3:19 pm ] |
| Post subject: | |
taysan wrote: myhostname = dotheton.dotheton.com You probably want to change this to "mail.dotheton.com", even if you give up on receiving mail with your linode. This name will appear as your HELO name when you send, and it will not match your DNS which might cause delivery problems. Quote: mydestination = dotheton.dotheton.com, localhost.dotheton.com, , localhost
This line lists ALL the domains your server will receive mail for, unless you have configured virtual hosting. If you want to receive mail for @dotheton.com, then dotheton.com needs to be listed in either mydestination, virtual_mailbox_domains, or virtual_alias_domains. Also, the ", ," part of mydestination is probably not helping anything either |
|
| Author: | taysan [ Thu Jan 27, 2011 3:26 pm ] |
| Post subject: | |
Made those changes, and lo and behold, my mail isn't bouncing back at me any more! Now, if I could just sort out where its going.... |
|
| Author: | Stever [ Thu Jan 27, 2011 3:40 pm ] |
| Post subject: | |
If you used mydestination, then probably in /var/mail or /var/spool/mail |
|
| Author: | taysan [ Thu Jan 27, 2011 9:50 pm ] |
| Post subject: | |
So any hints on how to 'bounce' incoming mail to their respective external accounts? There are only a couple of addresses which won't be changing much if ever. I also didn't want to be having to set up every mail account as a 'user' on the VPS anyhow, so relaying it all out works best for me. Thanks again for all the help - feels like I'm getting closer. |
|
| Author: | taysan [ Thu Jan 27, 2011 11:39 pm ] |
| Post subject: | |
HOLY CRAP. OK, so after another hour of digging, I stumbled across an innocuous post that solved my problem. DO NOT TEST your Postfix's ability to forward mail to an address, FROM that same address, at least if it's GMAIL. For WHATEVER reason, if you send an email from your gmail account, to your Postfix domain email, which is set up to forward it back to that same gmail account, it goes into the ether. BUT, it does work from another one of my email addresses, so it would seem my problems are solved AND, I setup my forwarding in the virtual file to send to my Hotmail for fun, and tested it from the same Hotmail account. Worked no problem. Seems to be a Google specific thing. |
|
| Author: | Stever [ Fri Jan 28, 2011 1:19 pm ] |
| Post subject: | |
Glad to hear you have things working. Forwarding is tricky business in the modern email universe - Google is probably recognizing that your server is attempting to send mail from a google account, and is probably saying, "you are not google, this message is a forgery". That is why I think if you just want to forward mail to a google account you might be best off switching back to google apps. |
|
| Author: | rsk [ Fri Jan 28, 2011 4:22 pm ] |
| Post subject: | |
I think Gmail has some kind of de-duplication mechanism, so if it finds you sent it the very exact mail that already is in the inbox (OR sent box), it ignores it. A one@gmail -> user@linode -> forward to another@gmail chain does work right, so it's not a "you're not gmail" thing. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|