LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 04-25-2009, 07:51 AM   #1
rmihai
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Rep: Reputation: 0
postfix can send but cannot receive emails


Hello,



I have configured Postfix on a Ubuntu 8.04 box using this tutorial:

http://www.howtoforge.com/perfect-se...ntu8.04-lts-p5

I can send emails but I cannot receive any email because of a "bad recipient address syntax:"

The log from /var/log/mail.info says this:

Code:
Apr 25 14:46:06 360romania postfix/pickup[31716]: 74A682190661: uid=0 from=<root>
Apr 25 14:46:06 360romania postfix/cleanup[32402]: 74A682190661: message-id=<20090425124606.74A682190661@mail.360romania.eu>
Apr 25 14:46:06 360romania postfix/qmgr[31717]: 74A682190661: from=<root@360romania.eu>, size=349, nrcpt=1 (queue active)
Apr 25 14:46:06 360romania postfix/local[32404]: 74A682190661: to=<root@360romania.eu>, relay=local, delay=0.04, delays=0.03/0/0/0.01, dsn=5.1.3, status=bounced (bad recipient address syntax: root@360romania.eu`)
Apr 25 14:46:06 360romania postfix/cleanup[32402]: 79AF52190662: message-id=<20090425124606.79AF52190662@mail.360romania.eu>
Apr 25 14:46:06 360romania postfix/qmgr[31717]: 79AF52190662: from=<>, size=2121, nrcpt=1 (queue active)
Apr 25 14:46:06 360romania postfix/bounce[32405]: 74A682190661: sender non-delivery notification: 79AF52190662
Apr 25 14:46:06 360romania postfix/qmgr[31717]: 74A682190661: removed
Apr 25 14:46:06 360romania postfix/local[32404]: 79AF52190662: to=<root@360romania.eu>, relay=local, delay=0.03, delays=0.02/0/0/0.01, dsn=5.1.3, status=bounced (bad recipient address syntax: root@360romania.eu`)
Apr 25 14:46:06 360romania postfix/qmgr[31717]: 79AF52190662: removed
It looks like something is appending the character ` to the final email address so that the final recipient gets written like this:

Code:
root@360romania.eu`
instead of

Code:
root@360romania.eu

Can anyone tell me what is wrong?

The content of the file 'main.cf' is the following:

Code:
# 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/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.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 = mail.360romania.eu
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $mydomain
mydestination = mail.360romania.eu locahost www.360romania.eu 360romania.eu
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
home_mailbox = Maildir/

Regards,
Razvan
 
Old 04-26-2009, 11:21 AM   #2
rmihai
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Nobody has any clues?
 
Old 04-27-2009, 06:42 AM   #3
friendyogi
LQ Newbie
 
Registered: Apr 2008
Location: Hyderabad
Distribution: Redhat, Centos, Ubuntu, Debian
Posts: 5
Blog Entries: 2

Rep: Reputation: 0
Details??

Please define some more....
  1. R u using dovecot for pop/imap?
  2. Have u tried to send mails to other domains?
  3. R u able to receive mails from other domains?
 
Old 04-28-2009, 12:38 PM   #4
rmihai
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by friendyogi View Post
Please define some more....
  1. R u using dovecot for pop/imap?
  2. Have u tried to send mails to other domains?
  3. R u able to receive mails from other domains?
1) I am not using Dovecot or any other solution. What I am trying to do right now is to send email to myself (root to root) using this command:

echo Test1 | mail -s Blabla root@360romania.eu

2) I can send emails to any domain. I have no problem sending email! I only have problem when I have to receive them.

3) I am not able to receive emails from anywhere. All the time, I am getting the error that I mentioned in my initial post.

... what can be wrong?

Personally, I suspect that something is adding a ` character to the receiving email address.
 
Old 05-01-2009, 08:04 AM   #5
rmihai
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Well .... any ideas?
 
Old 05-01-2009, 09:27 AM   #6
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
You can start by grepping for backticks, e.g.
Code:
grep -rl '`' /etc/postfix/ /etc/aliases ~/.forward ...
 
Old 05-01-2009, 01:14 PM   #7
10speed705
Member
 
Registered: May 2009
Location: Ontario Canada
Distribution: debian
Posts: 56

Rep: Reputation: 17
Hey not sure if u resolved the issue or not but i was able to hit ur servers. if still having the problem try doing it from a user as apose to root.

May 1 14:09:29 postfix/smtp[23590]: A707D22D6: to=<root@360romania.eu>, relay=mail.360romania.eu[78.46.72.171]:25, delay=11, delays=0.04/0/11/0.31, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 0C18D2190484)
May 1 14:09:29 postfix/qmgr[2132]: A707D22D6: removed
 
Old 05-02-2009, 01:20 AM   #8
alex2323
LQ Newbie
 
Registered: Sep 2008
Posts: 24

Rep: Reputation: 15
video tutorial for newbie:
http://www.sima-it.com/en/how_to_ste...MySQL_FreeBSD/
 
Old 05-02-2009, 02:17 AM   #9
rmihai
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Berhanie, it is working now!!!

The problem was in the file /etc/aliases! After the alias for root there was a backtick! I don't know how it got there.

Sorry about this ... This is my first Postfix installation.

Previously, I checked the config files from /etc/postfix/ and didn't found anything wrong (since there was nothing wrong there). I didn't checked the /etc/aliases file because I didn't knew about it.

So, what I did is this (it might help other people):
1. update the file '/etc/aliases';
2. run the command 'newaliases';
3. run the command '/etc/init.d/postfix restart';


Thank you!
 
Old 05-02-2009, 09:12 AM   #10
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Good job, rmihai. Also, usually there's no need to restart postfix after making changes: postfix reload is sufficient. You might also want to read this at some point.
 
  


Reply


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
Postfix : mail cannot send to send outside ( can send/receive locally) bobbinsupport Linux - Networking 3 12-15-2007 10:40 PM
Postfix problems ! - can send but not receive emails. OzTEXS Linux - Server 9 05-05-2007 08:06 AM
can receive emails but cannot send it? rhxk Linux - General 6 03-06-2007 04:24 PM
Can send but not receive any emails with Qmail. anorman Linux - Software 1 12-11-2003 02:51 PM
Can't send or Receive Emails amohime Linux - Networking 4 04-11-2003 02:42 AM


All times are GMT -5. The time now is 07:13 AM.

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