mail relaying and postfix reject_unverified_recipient

Hi,

for some domains we use mail relaying. When mail relaying is enabled for a domain Virtualmin adds that domain to the transport_maps file and to the list of relay_domains. Can I safely change that list to a hash file?

relay_domains = slagenlandwonen.nl, wfcommunicatie.nl, gooischebrink.com, interjute.nl, melamo.nl, fair-play.nl, loopbaankamer.nl, ospl.nl, ospl.de, printcontrol.nl, dankers-schilderwerken.nl, promonta.nl, interim-denbosch.nl

replace with

relay_domains = hash:/opt/csw/etc/postfix/relay_domains

I also use reject_unverified_recipient to prevent backscatter. But I only want to apply that reject rule to the relay_domains. Can I easily create another file which contains something like this:

slagenlandwonen.nl reject_unverified_recipient wfcommunicatie.nl reject_unverified_recipient ...

offcourse this file should be up-to-date when a new domain is added in Virtualmin.

Status: 
Closed (fixed)

Comments

Is this relay_domains file on your secondary mail server? That is the only place Virtualmin adds to it ..

It doesn't support this being a map though - domains are always just added to that line.

Hi Jamie,

the relay_domains is on our primary mail server. The domains in that list are added when I enable "Relay mail for domain?" and "Configure Mail Relaying" and set the "Destination SMTP server".

Our primary (and secondary) mail server act as a virus and spam filter and relay the mail to the final destination.

Because we got more and more customers who want to use our servers as a defense the line is getting longer and longer.

Also I only want to use reject_unverified_recipient for the relay_domains.

Currently I can't think of any nice way to do this using Virtualmin .. however, the 3.74 release will support relay_domains being a map, as long as it is the first value. This will then let you use that map elsewhere in your config..

Automatically closed -- issue fixed for 2 weeks with no activity.