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 [email protected]:
    echo 'This is a test' | mail -s 'test-out' [email protected]

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=<[email protected]>
    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=<[email protected]>
    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!

6
  • 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, 2013 at 11:49
  • I don't pretend to delegate the e-mail sending. Some mails are sended from any scripts to [email protected] and I want to prevent Postfix not to hold the e-mails to xxxxxxxxxx.com (myhostname). Jul 11, 2013 at 15:28
  • Ma dove deve finire questa posta? C'e un server di posta ufficiale per xxxxxxxxx.com?
    – NickW
    Jul 11, 2013 at 15:31
  • Sorry, Nick io non parlo italiano :) Jul 11, 2013 at 18:03
  • Scusami, so, where is this MX record for xxxxxxxxx.com pointed?
    – NickW
    Jul 12, 2013 at 8:15

1 Answer 1

0

At last it was necessary to set


mydestination = localhost

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .