LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   postfix can send but cannot receive emails (https://www.linuxquestions.org/questions/linux-server-73/postfix-can-send-but-cannot-receive-emails-721579/)

rmihai 04-25-2009 07:51 AM

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

rmihai 04-26-2009 11:21 AM

Nobody has any clues?

friendyogi 04-27-2009 06:42 AM

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?

rmihai 04-28-2009 12:38 PM

Quote:

Originally Posted by friendyogi (Post 3522300)
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.

rmihai 05-01-2009 08:04 AM

Well .... any ideas?

Berhanie 05-01-2009 09:27 AM

You can start by grepping for backticks, e.g.
Code:

grep -rl '`' /etc/postfix/ /etc/aliases ~/.forward ...

10speed705 05-01-2009 01:14 PM

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

alex2323 05-02-2009 01:20 AM

video tutorial for newbie:
http://www.sima-it.com/en/how_to_ste...MySQL_FreeBSD/

rmihai 05-02-2009 02:17 AM

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!

Berhanie 05-02-2009 09:12 AM

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.


All times are GMT -5. The time now is 08:44 PM.