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

I want to redirect my system mail to my gmail account, and I've setup postfix on an ubuntu server in an attempt to do so. However, when I telnet to 25 and send emails, the emails just appear to queue, and when I create a .forward entry in my user's home directory, the forwarded email is never received. Now, if I remove the .forward, I do indeed receive the email, which leads me to think something is going awry.

What could be going wrong? I'm new to postfix.

After removing a bad virtual name,

Aug 29 02:02:41 li64-245 postfix/qmgr[20838]: 8F63460458: from=<personal@gmail.com>, size=1977, nrcpt=1 (queue active)
Aug 29 02:02:41 li64-245 postfix/local[20869]: 82C3460323: to=<test@stefankendall.com>, relay=local, delay=0.13, delays=0.08/0/0/0.05, dsn=2.0.0, status=sent (forwarded as 8F63460458)
Aug 29 02:02:41 li64-245 postfix/qmgr[20838]: 82C3460323: removed
Aug 29 02:02:42 li64-245 postfix/smtp[20870]: 8F63460458: to=<personal@gmail.com>, orig_to=<test@stefankendall.com>, relay=gmail-smtp-in.l.google.com[209.85.212.44]:25, delay=1.4, delays=0.05/0.01/0.11/1.2, dsn=2.0.0, status=sent (250 2.0.0 OK 1251511363 10si2655905vws.3)
Aug 29 02:02:42 li64-245 postfix/qmgr[20838]: 8F63460458: removed
Aug 29 02:03:11 li64-245 postfix/smtpd[20865]: disconnect from mail-gx0-f216.google.com[209.85.217.216]

Yet I receive no emails in personal. What gives? I've set a manual .forward entry for user test.

EDIT: Gmail will not allow the responder to auto-forward back to the sender. Switching email accounts, I was about to receive the forwarded mail.

share|improve this question

4 Answers 4

up vote 1 down vote accepted
Aug 29 00:31:12 li64-245 postfix/error[20676]: 31BEC60456: to=<personalemail@gmail.com>, relay=none, delay=0.02, delays=0.01/0/0/0.01, dsn=5.0.0, status=bounced (User unknown in virtual alias table)

This looks like your local server is accepting the mail for personalemail@gmail.com (0.02 delay and error response) and bouncing it. Did you setup a virtual for gmail?

What is the output of postconf -n?

share|improve this answer
    
...apparently. I'll retry forwarding now. :) –  Stefan Kendall Aug 29 '09 at 1:58

from what I know, gmail does not accept mail from servers which don't have FQDN (fully qualified domain name) having checked this one, you could look in the postfix logs - /var/log/maillog or /var/log/mail.log - for the reason of not delivering mail

share|improve this answer

In postfix/main.cf, check your myhostname, mydomain, myorigin values to make sure they are set correctly.

Second thought, who is your ISP? For people with DSL and cable modems, certain ISP are now blocking outbound SMTP on port 25 to prevent spamming. From your Linux box, try connecting to port 25 on Google's mail server (use dig mx gmail.com to find a machine name).

share|improve this answer

On one console window, type

sudo tail -f /var/log/maillog

On another console window, type

echo "testing" | mail -s "test email" myaddress@gmail.com

Then switch back to the first console to see what's happening, as it's happening.

Also, if you're just forwarding your accounts, you can edit your /etc/aliases like:

root: myaddress@gmail.com

postmaster: myotheraddress@gmail.com

But what you see in the mail log is probably show you what the problem is.

share|improve this answer
    
Alternate method, roughly same results: tail -f /var/log/maillog &; echo "testing" | mail -s "test email" myaddress@gmail.com. This will dump the log output to the same console if, like me, you're too lazy to switch back and forth =) –  Greeblesnort Aug 30 '09 at 4:30

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.