On Jun 14, 2015, at 10:26 AM, Edgar Pettijohn III wrote:

> I am trying to install the "extras" from 
> https://opensmtpd.org/archives/opensmtpd-extras-latest.tar.gz on OpenBSD 5.7 
> amd64.  I used the following ./configure
> 
> # ./configure --libexecdir=/usr/libexec/smtpd --bindir=/usr/bin 
> --sbindir=/usr/sbin --sysconfdir=/etc --mandir=/usr/share/man 
> --with-mantype=man 
> 
> The build and install goes smoothly, however the manual pages don't appear to 
> be installed.   Any help/suggestions welcomed.
> 
> Thanks,
> 
> Edgar
> --
> You received this mail because you are subscribed to [email protected]
> To unsubscribe, send a mail to: [email protected]

disregard the above

Apparently if you don't supply ./configure --with-filter-"something" then they 
don't get built and installed, so I added --with-filter-regex as it seemed easy 
to play with.  It built and installed correctly.

To implement I added the following to smtpd.conf: 

table aliases db:/etc/mail/aliases.db
table vusers file:/etc/mail/vusers
table vdomains file:/etc/mail/vdomains
table creds file:/etc/mail/creds
table recipients file:/etc/mail/recipients
filter regex "/usr/libexec/smtpd/filter-regex"

bounce-warn 1h, 6h, 2d
expire 3d

listen on lo0 port 25 filter regex tag FILTERED
listen on egress 
listen on egress port submission tls-require  auth <creds> tag GOODTOGO

accept for local alias <aliases> deliver to maildir
accept tagged GOODTOGO for any relay

# tagged mail returned from regex-filter deliver
accept tagged FILTERED for domain <vdomains> virtual <vusers> deliver to mda \
        "/usr/local/libexec/dovecot/dovecot-lda -f %{sender} -d %{rcpt}"

# untagged mail
accept from any for domain <vdomains> recipient <recipients> relay via \
        smtp://127.0.0.1:25

/etc/mail/filter-regex.con
dataline (Viagra|Cialis)

However, an email sent with Subject: Viagra still makes it through.

I also tried the following with the same results:

table aliases db:/etc/mail/aliases.db
table vusers file:/etc/mail/vusers
table vdomains file:/etc/mail/vdomains
table creds file:/etc/mail/creds
table recipients file:/etc/mail/recipients
filter regex "/usr/libexec/smtpd/filter-regex"

bounce-warn 1h, 6h, 2d
expire 3d


listen on egress filter regex tls  auth-optional tag FILTERED
listen on egress port submission tls-require auth <creds> tag GOODTOGO

accept for local alias <aliases> deliver to maildir
accept tagged GOODTOGO for any relay

# tagged mail returned from regex-filter deliver
accept from any tagged FILTERED for domain <vdomains> virtual <vusers> deliver 
to mda \
        "/usr/local/libexec/dovecot/dovecot-lda -f %{sender} -d %{rcpt}"


--
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]

Reply via email to