Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

All I want to do is install postfix, and forward emails. I don't need anything to stay on my server. This is giving me hell. I tried the best I could, but postfix is denying all relays.

What I want is this. Say my server is at example.com. I want this:

Email forwarding: user1@example.com -> user1@gmail.com user2@example.com -> user2@yahoo.com user3@example.com -> user3@hotmail.com

All I need is a forwarding box that redirects emails coming to it. Since there's obviously something wrong with my configuration, I could really just use an example main.cf for my purpose, and I'll be on my way.

Edit: Logs

The strange thing is the logs don't give me any errors.

main.cf:

mreiley@Omega-14:/var/log$ cat /etc/postfix/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.

myhostname = omega-14.omegadev.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = omega-14.omegadev.org, localhost.omegadev.org, 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

virtual_alias_domains = omegadev.org monovec.com ifmovement.org
virtual_alias_maps = hash:/etc/postfix/virtual

mreiley@Omega-14:/var/log$ 

virtual forwards file:

mreiley@Omega-14:/var/log$ cat /etc/postfix/virtual
[EXPUNGED]@omegadev.org blahboybang@gmail.com
mreiley@omegadev.org blahboybang@gmail.com

mreiley@Omega-14:/var/log$ 

Then I send an email from gmail to test the configuration. This is what mail.log shows:

Jul 16 16:00:32 Omega-14 postfix/smtpd[4282]: connect from mail-px0-f179.google.com[209.85.212.179]
Jul 16 16:00:32 Omega-14 postfix/smtpd[4282]: 72784483A: client=mail-px0-f179.google.com[209.85.212.179]
Jul 16 16:00:32 Omega-14 postfix/cleanup[4287]: 72784483A: message-id=<4C40E48C.1080701@Paraphymn.com>
Jul 16 16:00:32 Omega-14 postfix/qmgr[4274]: 72784483A: from=<blahboybang@gmail.com>, size=2026, nrcpt=1 (queue active)
Jul 16 16:00:33 Omega-14 postfix/smtp[4288]: 72784483A: to=<blahboybang@gmail.com>, orig_to=<mreiley@omegadev.org>, relay=gmail-smtp-in.l.google.com[74.125.53.27]:25, delay=1.5, delays=0.08/0.01/0.08/1.3, dsn=2.0.0, status=sent (250 2.0.0 OK 1279321231 d5si4147919wam.28)
Jul 16 16:00:33 Omega-14 postfix/qmgr[4274]: 72784483A: removed

The log claims that the delivery was a complete success, but the email never shows up in my inbox or spam folder.

However, if I use telnet, I get a different story.

mreiley@Omega-14:/var/log$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 omega-14.omegadev.org ESMTP Postfix (Ubuntu)
helo omegadev.org
250 omega-14.omegadev.org
mail from:mreiley@omegadev.org
250 2.1.0 Ok
rcpt to:blahboybang@gmail.com
554 5.7.1 <blahboybang@gmail.com>: Relay access denied

Update! It would seem that GOOGLE ITSELF is blocking me. Emails sent to other providers go through, but when sent to gmail they don't even hit spam.

share|improve this question
    
Perhaps you could show us what you have, and provide some errors from the logs to help us. –  Nathan Powell Jul 16 '10 at 22:54
add comment

2 Answers

The telnet session and the postfix logs do not appear to be doing the same thing.

The 'RCPT TO' should be the local user, not the gmail user.

The 'MAIL FROM' is also different, since in the second, you appear to be the local user, and in the first, you're a gmail user.

So the telnet session is not a valid test.

The logs indicate that google has accepted the email. Check your spam tag again.

share|improve this answer
    
It's not in my spam folder. I've sent more than 10. Whatever postfix says, google is not receiving the emails. –  TachyonImpact Jul 17 '10 at 0:24
    
Update! It would seem that GOOGLE ITSELF is blocking me. Emails sent to other providers go through, but when sent to gmail they don't even hit spam. –  TachyonImpact Jul 17 '10 at 0:32
    
Ok, not entirely surprising. Do you have PTR records set up for that domain? –  Nathan Powell Jul 17 '10 at 0:53
add comment

Are you sending the test E-Mail from gmail? Over at Laughing Squid Web hosting we find that gmail does not like forwarded E-Mail if it is sent from gmail and then forwarded to gmail. It seems to do with its spam filter. I would suggest trying with yahoo and see what happens then.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.