Postfix config with postscreen AND smtp port

Discussion in 'Installation/Configuration' started by francoisPE, Jul 14, 2022.

  1. francoisPE

    francoisPE Active Member HowtoForge Supporter

    Hello,
    I have a multiple servers ispc configuration with a mail server.
    On this, I want a specific postfix configuration : not sure that's possible.
    On port 25, I put postcreen and so remove 'no authentication' connections !
    That's good!
    But, now I want my rspamd to send dmarc report !
    As per documentation (https://www.rspamd.com/doc/modules/dmarc.html)
    Code:
    From Rspamd 3.0 you should use rspamadm dmarc_report tool called manually (e.g. via cron or systemd timers) to send reports, this should be done either daily or hourly depending on traffic. You also need a working MTA running on a specific host that allows email to be sent with no authentication/ssl (preferrably local MTA).
    So that I need to reopen a port without authentification...
    I decide to use port 2525
    My master.cf starts like
    Code:
    2525      inet  n       -       y       -       -       smtpd
    smtp      inet  n       -       y       -       1       postscreen
    smtpd     pass  -       -       y       -       -       smtpd
    dnsblog   unix  -       -       y       -       0       dnsblog
    tlsproxy  unix  -       -       y       -       0       tlsproxy
    submission inet n       -       y       -       -       smtpd
    
    I wonder if it is correct...
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    That should work, or you could even use 127.0.0.1:2525
     
  3. francoisPE

    francoisPE Active Member HowtoForge Supporter

    Thank you very much :)

    For step done, but I am still quite worried about dmarc report setting in rspamd.
    Dmarc reporting module doesn't mention any password for email...
    Code:
    reporting {
        # Required attributes
        enabled = true; # Enable reports in general
        email = '[email protected]'; # Source of DMARC reports
        domain = 'mydom.tld'; # Domain to serve
        org_name = 'myorg'; # Organisation
        # Optional parameters
        bcc_addrs = ["[email protected]"]; # additional addresses to copy on reports
        report_local_controller = false; # Store reports for local/controller scans (for testing only)
        helo = 'rspamd.mydom.tld'; # Helo used in SMTP dialog
        smtp = '127.0.0.1'; # SMTP server IP
        smtp_port = 2525; # SMTP server port
        from_name = 'Rspamd.mydom.tld'; # SMTP FROM
        msgid_from = 'rspamd'; # Msgid format
        max_entries = 1k; # Maxiumum amount of entries per domain
        keys_expire = 2d; # Expire date for Redis keys
        #only_domains = '/path/to/map'; # Store reports merely from those domains
    }
    
    So, I did that :
    I create a mail box to send report disabling sending and imap/pop
    upload_2022-7-15_10-9-26.png

    Next, I create a relay recipient
    upload_2022-7-15_10-11-2.png

    and a route transport
    upload_2022-7-15_10-12-2.png

    But I am not really sure as it is a transport to the same server (my mail server...)
     
  4. francoisPE

    francoisPE Active Member HowtoForge Supporter

    Also, route transport is for domain and not email...
    I don't know how to test that ?
     
  5. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    I would expect the reports to send from localhost without any additional configuration, did you try sending a test email through 127.0.0.1:2525?
     
  6. francoisPE

    francoisPE Active Member HowtoForge Supporter

    I did so and it works.
    Thank you
     
  7. francoisPE

    francoisPE Active Member HowtoForge Supporter

    All this brings question to me
    When setting up multiple servers conf, non mail servers are set as 'satellite' and relay to mail server.
    I imagine that none of all postfix (satellites and mail) can't be used as relay by other external servers to my conf ?
    It seems obvious but i prefer ask
     
    Last edited: Jul 18, 2022

Share This Page