Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
rewriting(5)		      File Formats Manual		  rewriting(5)

NAME
       rewriting - syntactic changes to	mail-address host names

DESCRIPTION
       new-inject  and	ofmipd support a generic rewriting system for Internet
       mail addresses.	Each host name is transformed according	to a series of
       instructions, as	described here.	 The instructions are followed in  or-
       der, each at most once.

       An instruction is either	=post:new, *post:new, ?post:new, or -post:new.
       =post:new  means	that the host name post	is replaced by new.  *post:new
       means that any host name	of the form prepost  is	 replaced  by  prenew.
       ?post:new  means	that any host name of the form prepost,	where pre does
       not contain dots	or brackets, is	replaced by prenew.   -post:new	 means
       that any	host name of the form prepost is replaced by new.

       For  example,  the  instruction	*.: removes a trailing dot if there is
       one; =:vangogh converts an empty	host name into vangogh;	 ?:.cs.b  adds
       .cs.b  to  any  host  name  without dots	or brackets; *.b:.berkeley.edu
       changes vangogh.cs.b  into  vangogh.cs.berkeley.edu;  -.local:cs.berke-
       ley.edu converts	me.local into cs.berkeley.edu.

INSTRUCTION SOURCES
       Rewriting instructions are normally listed in the rewrite control file,
       one instruction per line.

       If  rewrite does	not exist, new-inject and ofmipd use the control files
       defaultdomain, defaulthost, and plusdomain in  the  following  instruc-
       tions:

	  *.:
	  =:defaulthost
	  *+:.plusdomain
	  ?:.defaultdomain

       In  other  words: (1) If	the host name ends with	a dot, remove the dot.
       (2) If the host name is empty, add defaulthost.	(3) If the  host  name
       ends  with  a  plus sign, change	the plus sign to a dot and add plusdo-
       main.  (4) If the host name does	not contain dots or  brackets,	add  a
       dot and add defaultdomain.

       The  defaultdomain,  defaulthost,  and  plusdomain control files	can be
       overridden by the environment variables $QMAILDEFAULTDOMAIN,  $QMAILDE-
       FAULTHOST, and $QMAILPLUSDOMAIN respectively.  They all default to me.

SEE ALSO
       new-inject(1), rewritehost(3), qmail-control(5),	ofmipd(8)

								  rewriting(5)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=rewriting&sektion=5&manpath=FreeBSD+Ports+14.3.quarterly>

home | help