email not sending to myself on local server

Discussion in 'ISPConfig 3 Priority Support' started by jpcyrenne, Dec 20, 2013.

  1. jpcyrenne

    jpcyrenne Member HowtoForge Supporter

    Good Day,

    I have a problem with an application sending events to the local mailbox. I also noticed that I can't send an email to myself.

    I was getting loop back errors (mail for mailx.gagnantminute.ca loops back to myself).

    I followed these examples to add the domain to mydestination and now I get a warning, it seems to be delivered but I don't get the email in my INBOX.

    http://www.cyberciti.biz/faq/postfix-mail-for-domaincom-loops-back-to-myself-error-and-solution/
    http://www.howtoforge.com/postfix-mail-for-example.com-loops-back-to-myself

    log:
    ----
    Dec 20 09:10:01 mailx postfix/smtpd[13837]: connect from localhost[::1]
    Dec 20 09:10:01 mailx postfix/smtpd[13837]: lost connection after CONNECT from localhost[::1]
    Dec 20 09:10:01 mailx postfix/smtpd[13837]: disconnect from localhost[::1]
    Dec 20 09:10:08 mailx dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=13867, se
    cured
    Dec 20 09:10:08 mailx postfix/pickup[13153]: 7D17726807B7: uid=48 from=<[email protected]>
    Dec 20 09:10:08 mailx postfix/cleanup[13864]: 7D17726807B7: message-id=<[email protected]>
    Dec 20 09:10:08 mailx postfix/qmgr[13154]: 7D17726807B7: from=<[email protected]>, size=733, nrcpt=1 (queue active)
    Dec 20 09:10:08 mailx postfix/trivial-rewrite[13868]: warning: do not list domain mailx.gagnantminute.ca in BOTH mydestination and virtual
    _mailbox_domains
    Dec 20 09:10:08 mailx postfix/trivial-rewrite[13868]: warning: do not list domain mailx.gagnantminute.ca in BOTH mydestination and virtual
    _mailbox_domains
    Dec 20 09:10:08 mailx postfix/local[13873]: 7D17726807B7: to=<[email protected]>, orig_to=<[email protected]>, r
    elay=local, delay=0.25, delays=0.15/0/0/0.1, dsn=2.0.0, status=sent (delivered to mailbox)
    Dec 20 09:10:08 mailx postfix/qmgr[13154]: 7D17726807B7: removed
    Dec 20 09:10:08 mailx dovecot: imap([email protected]): Disconnected: Logged out bytes=681/460
    Dec 20 09:10:08 mailx dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=13875, se
    cured
    Dec 20 09:10:08 mailx dovecot: imap([email protected]): Disconnected: Logged out bytes=117/1407

    PS: now get a warning. Should i remove the domain name from virtual_mailbox_domains?

    Any idea why it is not in my inbox?

    Thank you,

    JP Cyrenne
     
    Last edited: Dec 20, 2013
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The guides you used are for ispconfig 2 and not compatible with a modern setup like it is used in ispconfig 3.

    You may not add a domain that is used for email mailboxes in ispconfig 3 to mydestination in a postfix virtuser setup. Domains are defined only in mysql on a ispconfig 3 server, not in postfix main.cf. To fix your problem, please remove the domain from mydestination and restart postfix.
     
  3. jpcyrenne

    jpcyrenne Member HowtoForge Supporter

    Till,

    I have removed it and it's back to the original:
    mydestination = localhost, localhost.localdomain

    restarted

    working!

    What's weird is that is why i did it in the first place? I wasn't receiving my own emails? I did have an old (original) server name in mydestination I did remove.

    Thanks,

    JP
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you receive your own mails now? In mydestinationyou can add the hostname of the server as well, the hostname should be a subdomain like mail.yourdomain.com, but not yourdomain.com.
     
  5. jpcyrenne

    jpcyrenne Member HowtoForge Supporter

    Yes it's working. Thanks for the great follow up.

    I can send to myself. Everything is good with ISPConfig3 and Postfix on port 25.

    --------
    I still need to play around with a few settings in Postfix. The application level (OEM pro or phpList) sends through new ports on new IPs (Postfix multi-domain - postmulti command). That's my last new challenge.

    I know it's out of scope for ISPConfig3, but if I massmail with an application on port 1025 or 1125 (smtp-out.sub.domain.com), do the other queues have use the same mysql authentification (i get a loop back error at this level). I would prefer not to (less load possible for a 1M email campaign). It works well, but i still get loopback errors at thit level... In other words would you have an idea as to how the MTA could send from port 1025 to 25 on local host? Say for [email protected] I'd like to add the subdomain to mydestination and fix this (which is the configured domain mailx.gagnantminute.ca in ISPConfig3).

    I'll probably document all of this in the end and send it in to you guys. Multi-domain, multi-queue mass mailer (4 sites, 4 IP with applications, DKIM, SPF...). This way a customer has his own IP reputation and not affected by others on server.

    fun challenge no?

    Thanks ahead,

    JP
     

Share This Page