Ville Walveranta a écrit : > Couple of messages earlier in this thread I posted the following pcre > smtpd_recipient_access table: > > # reject domains that are served by Katharion > # on the generic smtpd interface > /(@virtualdomain1\.com| > @virtualdomain2\.com| > @virtualdomain3\.com| > @virtualdomain4\.com| > @virtualdomain5\.com)$/ REJECT > > That was of wrong format. In case someone is reading this later in the > archives, here's the corrected version: > > /virtualdomain1\.com$/ REJECT > /virtualdomain2\.com$/ REJECT > /virtualdomain3\.com$/ REJECT > /virtualdomain4\.com$/ REJECT > /virtualdomain5\.com$/ REJECT > > PCRE statements can't be broken on multiple lines, of course, so if > there are many items on the list it's better to break up the boolean > statement.
As Henrik says, you can break them with /x. Note that in this example, pcre is too much. a hash (or cdb) will do fine: virtualdomain1.com REJECT virtualdomain2.com REJECT .... > Also, I had initially (though not in the earlier post).. > > /^/ OK > > .. in the end, thinking that the ones that are not explicitly rejected > should be allowed in the context of this PCRE table. But since the > table is called from smtpd_recipient_restrictions, such a statement > creates an open relay. > it doesn't look like you need that line anyway (you want to continue processing other checks, no?). Anyway, when such checks are to be performed before reject_unauth_destination, it is safer to put them in smtpd_sender_restrictions.