Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • I ISPConfig 3
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 597
    • Issues 597
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 46
    • Merge requests 46
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISPConfig
  • ISPConfig 3
  • Issues
  • #1475

Restrict MailFrom only from available mailboxes or aliases

Its usefull to restrict the mailserver to send mails with mailfrom from foreign mail adresses. e.g. I have the mail account blub@bla.de and try to send a mail with sender address admin@bla.de or admin@test.de

I used reject_authenticated_sender_login_mismatch in my installation:

File: /etc/postfix/mysql-virtual_senderloginmaps.cf user = ispconfig password = XXXXXXXX dbname = dbispconfig hosts = 127.0.0.1 query = select destination from mail_forwarding where source = '%s' and active = 'y' and type = 'alias' and server_id = XXXXXXXX union select email from mail_user where email = '%s' and postfix = 'y' and server_id = XXXXXXX;

Changed the following lines in main.cf: smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql-virtual_senderloginmaps.cf

proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps $smtpd_sender_login_maps

smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch, check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf

Edited Aug 16, 2020 by Thom
Assignee
Assign to
Time tracking