ifvalidto

Section: User Commands (1)
Index Return to Main Contents
 

NAME

ifvalidto - check for valid recipient; otherwise do not deliver mail  

SYNOPSIS

ifvalidto [ okaddr ... ]  

DESCRIPTION

ifvalidto reads a mail message from its standard input. It exits 0 if $RECIPIENT is listed in any To, Cc, or Bcc (targeted recipients) field, 99 if not. Addresses are compared without regard to case.

If you list some okaddr's, ifvalidto will use them in place of $RECIPIENT. It exits 100 if none of them are listed in any recipients header fields.

For example, you can put


   |ifvalidto 
   |./Maildir/

into your .qmail file to ignore all mails with a SMTP envelope address targeting you, but you are not a recipient according to the To, Cc, or Bcc information given.

Alternative, you may want to bounce the mail:


   |bouncesaying 'mail not delivered' except ifvalidto
   |./Maildir/

Or, you may apply a particular spam-catch address:


   |condredirect $LOCAL-spam except ifvalidto
   |./Maildir/

WARNING: ifvalidto will potentially disregard any mails originating from mailing lists. However, including your email address together with the usual 'To:' addresss of the mailing list allows you to overcome this situation.  

LOGGING

In case the message is discard for delivery ifvalidto places a warning in the qmail-send providing the purported Recipient.  

SEE ALSO

bouncesaying(1), condredirect(1), iftocc(1), except(1), dot-qmail(5)


 

Index

NAME
SYNOPSIS
DESCRIPTION
LOGGING
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 14:39:30 GMT, December 08, 2024