|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
OpenSMTPd filter - rewrite rctp
hey! i am struggeling to implement a simple rcpt rewrite with opensmtpd
context: a few machines in my lan network. they send mail using ssmtp to a central relay. the central relay runs opensmtpd. accepts mail from all internal hosts without auth. relays mail to an official smtp server in internet with auth. i want it to rewrite all internal addresses to my real email. so recipients that are used quite often are - localuser@host.lan.mydomain.tld - root@host.lan.mydomain.tld the opensmtpd host is igel-2 and sends mail as well to - root@igel-2.lan.mydomain.tld config: Code:
#$OpenBSD: smtpd.conf,v 1.14 2019/11/26 20:14:38 gilles Exp $ # This is the smtpd server system-wide configuration file. # See smtpd.conf(5) for more information. table aliases file:/etc/mail/aliases table secrets file:/etc/mail/secrets table rcpt { "@lan.mydomain.tld" } # Relay all mail via Hostpoint's SMTP server using authentication action "relay" relay host smtps://sharedhostingsmtpuser@smtp.sharedhoster.com auth <secrets> # define filter filter "rewrite-to" phase rcpt-to match rcpt-to <rcpt> rewrite "mail@mydomain.tld" # build chain filter "incoming_chain" chain {rewrite-to} # catch all match from any for any action "relay" listen on socket listen on all filter "incoming_chain" no rewriting of recipients is happening. i do not understand why, spend hours reading the man page. i would be grateful to get some help. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenSMTPD rewrite sender of relayed mail to virtual entry | discostew | OpenBSD General | 8 | 3rd June 2021 01:42 AM |
Need help with httpd rewrite rule | notooth | OpenBSD Packages and Ports | 2 | 15th September 2019 08:42 PM |
PDF/Postscript -> print filter -> Print Queue Filter | shep | Programming | 6 | 24th December 2018 03:33 PM |
fdisk -B does not rewrite the mbr | kasse | NetBSD General | 0 | 25th November 2008 11:07 PM |