0

I manage the mail via GoogleApps, and the MX records are correctly configured. When I try to send it from a script, there is no problem when the recipient is an external domain name, but with the self domain, the mails go nowhere.

I know that it is not necessary to set a relay server to fix this problem. In some blogs I have found the recomendation not to fill "mydestination" if I want to let go out my mail. After that I have reload the service, but no luck.

My postfix configuration file is this:

    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    config_directory = /etc/postfix
    inet_interfaces = all
    inet_protocols = ipv4
    mailbox_command = 
    mailbox_size_limit = 0
    mydestination = 
    myhostname = xxxxxxxxxx.com
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    myorigin = /etc/mailname
    readme_directory = no
    recipient_delimiter = +
    relayhost = 
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination
    smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
    smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtpd_use_tls = yes
    
When I try to send a mail to antonio@xxxxxxxxxx.com:
    echo 'This is a test' | mail -s 'test-out' antonio@xxxxxxxxxx.com

The log is:

    Jul 10 12:02:30 yyyyy postfix/pickup[9617]: 1B33E908A72A: uid=0 from=
    Jul 10 12:02:30 yyyyy postfix/cleanup[10603]: 1B33E908A72A: message-id=<20130710100230.1B33E908A72A@xxxxxxxxxx.com>
    Jul 10 12:02:30 yyyyy postfix/qmgr[9618]: 1B33E908A72A: from=, size=351, nrcpt=1 (queue active)
    Jul 10 12:02:30 yyyyy postfix/smtp[10605]: 1B33E908A72A: to=, relay=none, delay=0.44, delays=0.03/0.02/0.38/0, dsn=5.4.6, status=bounced (mail for xxxxxxxxxx.com loops back to myself)
    Jul 10 12:02:30 yyyyy postfix/cleanup[10603]: 84B23908A730: message-id=<20130710100230.84B23908A730@xxxxxxxxxx.com>
    Jul 10 12:02:30 yyyyy postfix/bounce[10606]: 1B33E908A72A: sender non-delivery notification: 84B23908A730
    Jul 10 12:02:30 yyyyy postfix/qmgr[9618]: 84B23908A730: from=<>, size=2287, nrcpt=1 (queue active)
    Jul 10 12:02:30 yyyyy postfix/qmgr[9618]: 1B33E908A72A: removed
    Jul 10 12:02:30 yyyyy postfix/smtp[10605]: 84B23908A730: to=, relay=none, delay=0, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail for xxxxxxxxxx.com loops back to myself)
    Jul 10 12:02:30 yyyyy postfix/qmgr[9618]: 84B23908A730: removed
    

Where is the missconfiguration?

And another question, which does yyyyy mean at the log file?

Thanks in advance!

  • If you don't want to set up a relay domain, how does it know that there is another server handling this mail (especially considering the MX record for that domain probably points to itself).. – NickW Jul 11 '13 at 11:49
  • I don't pretend to delegate the e-mail sending. Some mails are sended from any scripts to johndoe@xxxxxxxxxx.com and I want to prevent Postfix not to hold the e-mails to xxxxxxxxxx.com (myhostname). – Antonio Romero Oca Jul 11 '13 at 15:28
  • Ma dove deve finire questa posta? C'e un server di posta ufficiale per xxxxxxxxx.com? – NickW Jul 11 '13 at 15:31
  • Sorry, Nick io non parlo italiano :) – Antonio Romero Oca Jul 11 '13 at 18:03
  • Scusami, so, where is this MX record for xxxxxxxxx.com pointed? – NickW Jul 12 '13 at 08:15
  • $ host -t mx xxxxxxxxxx.com xxxxxxxxxx.com mail is handled by 5 ALT1.ASPMX.L.GOOGLE.com. xxxxxxxxxx.com mail is handled by 5 ALT2.ASPMX.L.GOOGLE.com. xxxxxxxxxx.com mail is handled by 10 ASPMX2.GOOGLEMAIL.com. xxxxxxxxxx.com mail is handled by 10 ASPMX3.GOOGLEMAIL.com. xxxxxxxxxx.com mail is handled by 1 ASPMX.L.GOOGLE.com. – Antonio Romero Oca Jul 12 '13 at 08:58

1 Answers1

0

At last it was necessary to set

mydestination = localhost

Now I receive my e-mails in the GoogleApps Inbox.