e-mail client configuration for smtp, Isp - postfix multiple domains

Discussion in 'Server Operation' started by kameleon1er, Sep 25, 2020.

  1. kameleon1er

    kameleon1er Member

    Hello everyone, probably a silly question, but I can't imagine the solution.

    I followed the perfect Debian-Apache guide. I configured isp with an A field > srv-b.MasterDomain.com = ok!
    I left the DNS management at my registrar > my ispConfig and I only enter the DNS zone per domain to redirect to

    Code:
    srv-b.MasterDomain.com
    Then I configured 2 other domains I need in ispConfig + email accounts. = OK
    Example: [email protected]

    I'm trying to understand that I have to enter the information in my local mail client "ThunderBird" as smtp host.

    I was thinking that logically, I should indicate in smtp my main domain :
    Code:
    srv-b.MasterDomain.com
    for outgoing mails.

    But this must be a mistake, because for each account configured in Tunderbird, I am asked for a login and password per email account.

    Do I have to create as many smtp+login+password smtp infos in Thunderbird as I have e-mail accounts, or is it possible in the Postfix configuration file to tell it that there is only one main mail address for all my domains
    Code:
    mails.MasterDomain.com as A entry
    and tell it which ones.

    Thanks to you.
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    If they are separate mailboxes, you have to set up smtp for every account (should happen automatically when adding the account). You can also add [email protected] as mailbox and add the other adresses as Email Alias, e.g. [email protected]. You can then receive and send for name2 from name.
     
  3. kameleon1er

    kameleon1er Member

    Hi Th0m,

    Okay, I think I understand. But if I choose e-mail alias as a solution, in my Thunderbird, would I receive the messages in different directories? And when it comes to replying to the received message, the main address will appear in the recipient's mailbox, right?

    At the same time I see this function in ispConfig "Allow target to send mail using this alias as origin" ... interesting ...
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    No, though you can set up filters for that in ISPConfig or in Thunderbird. But it's probably easier for you to login to separate mailboxes.

    When using the Alias function, you should enable that option. Forgot mentioning that.
     
    kameleon1er likes this.
  5. kameleon1er

    kameleon1er Member

    I will start with separate accounts and therefore 1 smtp per account. Super boring --° but, easiest :)
    However, for a little later, what do you think of this solution? : "Setup Postfix for multiple domains" > Configure the domain map > "virtual_alias_maps"
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Makes not much sense as ISPConfig is handling Aliases already. You will just screw up your system by manually configuring something that conflicts with your existing mail setup.

    And you can have multiple identities in Thunderbird when you receive all emails for multiple domains or addresses in one mailbox, that's no problem at all. See Thunderbird account settings, there is an option to manage multiple Identities.
     
  7. kameleon1er

    kameleon1er Member

    Hi @till @Th0m , ok, I wiil not try to configuring manually with shell. Thanks
     
  8. kameleon1er

    kameleon1er Member

    Hello @Th0m, @Til, I'm still configuring my isp and postfix, and I'm still having problems with outgoing mail.

    I must be wrong somewhere or I'm missing a configuration, maybe in postfix I don't know.

    I think my DNS zone for the first domain "srv-b.democrasite.com" is now ok, by the way, mail is coming in and going out. So, for my second domain configured in ispConfig "opaz-ateliers.com" I put in my e-mail client outgoing mail "srv-b.democrasite.com" but it must be an error.

    Here are my 2 DNS Zones. What don't I understand? Thank you.

    1) MasterDomain zone : > my IspConfig
    Code:
    $TTL 3600
    @    IN SOA dns200.anycast.me. tech.ovh.net. (2020092803 86400 3600 3600000 300)
                              IN NS     ns200.anycast.me.
                              IN NS     dns200.anycast.me.
                          300 IN MX     5 srv-b.democrasite.com.
                          300 IN MX     1 srv-b.democrasite.com.
                              IN A      163.172.143.149
                          600 IN TXT    "v=spf1 a mx a:srv-b.democrasite.com mx:srv-b.democrasite.com ptr:srv-b.democrasite.com ip4:163.172.143.149 ip6:2001:bc8:47b0:170a::1 ~all"
                          300 IN TXT    "1|www.democrasite.com"
    163.172.143.149           IN TXT    "mails.democrasite.com."
    _dmarc                    IN TXT    "v=DMARC1;p=none;pct=5;sp=quarantine;aspf=r;"
    default._domainkey        IN TXT    ( "v=DKIM1; t=s; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDe/LKkMG9Zka3eL0fNxOi4VfZz6Guk4/MZo2KfOVUYrb09HWYSpWRsR45gUXbrn866SDbrf8sDQRowkSUVIph7jegNH11EStS/fzIBbFUco6ONvquK/qkDlSlsCzapuUAk6XUw8t5Oz3Cki/3Tp29+hSflXjLGdflbTbsT0ZCgWwIDAQAB" )
    mails                     IN A      163.172.143.149
    srv-b                     IN A      163.172.143.149
    www                       IN A      163.172.143.149
    www                       IN TXT    "l|fr"
    www                       IN TXT    "3|welcome"
    2) Second domain :
    Code:
    $TTL 3600
    @    IN SOA dns112.ovh.net. tech.ovh.net. (2020092801 86400 3600 3600000 300)
                              IN NS     dns112.ovh.net.
                              IN NS     ns112.ovh.net.
                              IN A      163.172.143.149
                          600 IN TXT    "v=spf1 a mx a:srv-b.opaz-ateliers.com mx:srv-b.opaz-ateliers.com ptr:srv-b.opaz-ateliers.com ip4:163.172.143.149 ip6:2001:bc8:47b0:170a::1 ~all"
                              IN TXT    "1|www.opaz-ateliers.com"
    _dmarc                    IN TXT    "v=DMARC1;p=none;pct=5;sp=quarantine;aspf=r;"
    default._domainkey        IN TXT    "p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCch61adLZjWOP8QeTqmCPDeReMOURrhenvLlPdBflI87JPTXrpSsvTl6dcFchBLsvW2WmbCRUUEPmcOqgv8kamy5CTlFw9IAYgjBkHgo24JfH9jODodlB5W6ugt42sZjrNm/WDf7WzyXkeZsgeFKmWjVm2e7XtZ0l7Panusy+UwIDAQAB"
    mails                     IN MX     10 srv-b.democrasite.com.
    mails                     IN MX     5 srv-b.democrasite.com.
    mails                     IN A      163.172.143.149
    mails                     IN TXT    "163.172.143.149"
    www                       IN A      163.172.143.149
    www                       IN TXT    "l|fr"
    www                       IN TXT    "3|welcome"
     
  9. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    What is going wrong with sending? Do you see a error?

    What is this record?
    Code:
    mails                     IN TXT    "163.172.143.149"
    Your SPF record seems to be incorrect aswell. I would suggest creating a correct one for your master domain, like this:
    Code:
    _spf  IN  TXT "v=spf1 a mx a:srv-b.opaz-ateliers.com ip4:163.172.143.149 ip6:2001:bc8:47b0:170a::1 ~all
    and add this to all domains you manage:
    Code:
      IN TXT "v=spf1 a mx include:_spf.MASTERDOMAIN.COM"
    Replace MASTERDOMAIN.COM with the correct domain.
     
  10. kameleon1er

    kameleon1er Member

    Thanks, I tried your advices, but still fail when I test to > Gmail.
    Maybe I have yet problems in my postfix conf files. I'm digging… what I have in
    Code:
    nano /etc/mailname >
    democrasite.com
    in /etc/postfix/main.cf
    :
    Code:
    myhostname = srv-b.democrasite.com
    myorigin = /etc/mailname
    mydestination = localhost, localhost.localdomain,
    I think I have a padawan's problem here…
     
  11. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    What is the error you get from gmail? (in /var/log/mail.log)
     
  12. kameleon1er

    kameleon1er Member

    Code:
    Sep 28 20:15:42 srv-b postfix/qmgr[2408]: 20DFE81FED: from=<>, size=3749, nrcpt=1 (queue active)
    Sep 28 20:15:42 srv-b postfix/smtp[9223]: 20DFE81FED: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[2a00:1450:400c:c00::1a]:25, delay=0.19, delays=0.01/0/0.07/0.09, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[2a00:1450:400c:c00::1a] said: 550-5.7.1 [2001:bc8:47b0:170a::1] Our system has detected that this message does 550-5.7.1 not meet IPv6 sending guidelines regarding PTR records and 550-5.7.1 authentication. Please review 550-5.7.1  https://support.google.com/mail/?p=IPv6AuthError for more information 550 5.7.1 . i3si1634622wrs.151 - gsmtp (in reply to end of DATA command))
    Sep 28 20:15:42 srv-b postfix/qmgr[2408]: 20DFE81FED: removed
    Sep 28 20:16:08 srv-b dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=9251, secured, session=<xD4+VmWw1usAAAAAAAAAAAAAAAAAAAAB>
    Sep 28 20:16:08 srv-b dovecot: imap([email protected])<9251><xD4+VmWw1usAAAAAAAAAAAAAAAAAAAAB>: Logged out in=90 out=972 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
    Sep 28 20:17:07 srv-b dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=9302, secured, session=<8evFWWWw2usAAAAAAAAAAAAAAAAAAAAB>
    Sep 28 20:17:07 srv-b dovecot: imap([email protected])<9302><8evFWWWw2usAAAAAAAAAAAAAAAAAAAAB>: Logged out in=90 out=972 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
    Sep 28 20:17:24 srv-b dovecot: imap-login: Disconnected (auth failed, 3 attempts in 14 secs): user=<[email protected]>, method=PLAIN, rip=80.11.30.178, lip=10.65.110.21, TLS, session=<6UXqWWWwE/RQCx6y>
    Sep 28 20:18:08 srv-b dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=9368, secured, session=<mMVeXWWw3OsAAAAAAAAAAAAAAAAAAAAB>
    Sep 28 20:18:08 srv-b dovecot: imap([email protected])<9368><mMVeXWWw3OsAAAAAAAAAAAAAAAAAAAAB>: Logged out in=90 out=972 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
    
     
  13. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Okay, so you are sending over IPv6 and there is no PTR record set for your IPv6 address. You should set this, usually at your provider. The PTR record should be the hostname of your mailserver.
     
  14. kameleon1er

    kameleon1er Member

    Hi Th0m, isn't there ? :
    Code:
    IN TXT "v=spf1 a mx a:srv-b.democrasite.com mx:srv-b.democrasite.com ptr:srv-b.democrasite.com ip4:163.172.143.149 ip6:2001:bc8:47b0:170a::1 ~all"
    
    I see a ptr in it …

    My ispConfig machine is @scaleway, and they give me for ipV6 for my vps (instance) : 2001:bc8:47b0:170a::1
    not this one ?
     
  15. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    As said, I would suggest to change your SPF records.

    You don't set the PTR record in the SPF record. Please see your providers FAQ as I suppose they have a explanation on how to set it up for your IP address
     
  16. kameleon1er

    kameleon1er Member

    Wow ! OO… Are you telling me that I have to ask my internet provider "Orange.fr at work" but "Free.fr" at home to provide me with a PTR so that I can send emails from my local computer to the internet ?
     
  17. kameleon1er

    kameleon1er Member

    @Th0m
    Damned, I think it's my PTR :) :
    Code:
    host -t PTR 163.172.143.149
    149.143.172.163.in-addr.arpa domain name pointer mails.democrasite.com.
     
  18. kameleon1er

    kameleon1er Member

    I have a VPS, not a local VM behind a dsl modem…
     
  19. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    No.

    I don't think so.

    You have to set the PTR record for your VM. This is usually done at the provider that owns the IP address. So check with your hosting provider where to set it, for both yourr IPv4 and IPv6 address.
     
  20. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    My signature contains link to DNS tutorial that explains PTR record.
     

Share This Page