Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 03-09-2011, 03:36 PM   #1
LQ Newbie
Registered: Jul 2009
Distribution: Debian
Posts: 14

Rep: Reputation: 1
Postfix and fetchmail problem: sending mail as localhost instead the right domain

Hello everyone!

I'm configuring a MTA using Postfix.
I have started configuring my internal domain and everything has worked well. Then I have configured my server to forward messages to an external domain (using relayhost, sender_canonical_maps and recipient_canonical_maps directives). Sending e-mails was OK. But, when I tried to configure the Fetchmail to fetch the messages in the external server, my problems have started.

What happend is the following: the fetchmail was getting the messages in the external server, but was not delivering them to the mailboxes. The messages was standing in the users' /var/spool/mail files. Looking after the mail.log file I've noticed that there was a problem with message size. And it looked also trying to receive the messages through localhost domain instead of my configured domain.

Here are my configuration files:

#Please change this to your domain

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no

myhostname = jazz.cyber.local
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = $myhostname, localhost
mydestination = $myhostname
mynetworks = [::ffff:]/104 [::1]/128
recipient_delimiter = +
inet_interfaces = all

message_size_limit = 20000000
mailbox_size_limit = 200000000

#Configurações de encaminhamento
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
sender_canonical_maps = hash:/etc/postfix/sender_canonical
recipient_canonical_maps = hash:/etc/postfix/recipient_canonical

#smtp_use_tls = yes
#smtp_tls_CAfile = /etc/postfix/cert.pem
#smtp_tls_session_cache_database = btree:/var/run/smtp_tls_session_cache

# Zarafa configuration
zarafadomain = cyber.local
virtual_transport = lmtp:
virtual_mailbox_domains = $zarafadomain
virtual_mailbox_maps = mysql:/etc/postfix/
virtual_alias_maps = hash:/etc/postfix/virtual

smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
Code:   allanw@cyber.local
poll proto imap
user "" with pass "mypassword" is "allanw" here
Mar  9 15:17:32 jazz postfix/qmgr[5836]: 55293E015C: from=<>, size=312704, nrcpt=1 (queue active)
Mar  9 15:17:33 jazz postfix/smtpd[5894]: 0CD09E00E4: client=localhost[]
Mar  9 15:17:35 jazz postfix/cleanup[5897]: 0CD09E00E4: message-id=<>
Mar  9 15:17:36 jazz postfix/smtp[5924]: 55293E015C: to=<allanw@localhost>, relay=ASPMX5.GOOGLEMAIL.COM[]:25, delay=7.7, delays=3.7/0/0.59/3.4, dsn=5.1.1, status=bounced (host ASPMX5.GOOGLEMAIL.COM[] said: 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typos or 550-5.1.1 unnecessary spaces. Learn more at                              550 5.1.1 x21si5214543yhc.201 (in reply to RCPT TO command))
Mar  9 15:17:36 jazz postfix/qmgr[5836]: D2740E0161: removed
Mar  9 15:17:36 jazz postfix/cleanup[5930]: 53C09E0160: message-id=<20110309181736.53C09E0160@jazz.cyber.local>
Mar  9 15:17:36 jazz postfix/bounce[5929]: 55293E015C: sender non-delivery notification: 53C09E0160
Mar  9 15:17:36 jazz postfix/qmgr[5836]: 53C09E0160: from=<>, size=4949, nrcpt=1 (queue active)
Mar  9 15:17:36 jazz postfix/qmgr[5836]: 55293E015C: removed
Does anyone have an idea about what is happening to my MTA server working with Fetchmail?
I would really apreciate any help.

Best regards.
Old 03-10-2011, 08:19 AM   #2
LQ Newbie
Registered: Jul 2009
Distribution: Debian
Posts: 14

Original Poster
Rep: Reputation: 1
Good morning everybody!

I've solved my problem.

The solution is quite simple:
You just have to change the myorigin directive in the /etc/postfix/ file, putting the following:
myorigin = $myhostname
I hope it can help somebody in the future.
1 members found this post helpful.


fetchmail, mta, postfix

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with sending mail in postfix sohailkmu Linux - Server 4 03-04-2011 06:55 AM
Postfix Problem Sending SMTP Mail j.smith1981 Linux - Server 2 10-27-2010 10:51 PM
Fetchmail attempts to deliver to non-existent users with localhost as domain Tim Johnson Linux - Networking 5 02-28-2010 11:10 AM
Fetchmail/Postfix domain problem EldinTux SUSE / openSUSE 0 01-09-2005 06:47 AM
postfix : sending local mail without domain iainr Linux - Software 2 12-10-2003 04:05 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:46 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration