Forward @domain.com v Postfixe

Peter Mann Peter.Mann na tuke.sk
Úterý Říjen 22 05:56:09 CEST 2002


On Mon, Oct 21, 2002 at 04:53:06PM -0700, Peter Hanusiak wrote:
> Potreboval by som nastavit pravidlo pre Postfix pre forwardovanie
> zlej posty pre domain.com na konkretneho uzivatela.
> T.j. ak sa niekto pomyli pri pisani mena uzivatela, tak aby sa posta
> nestratila ale aby bola poslana na nejake vyznacne konto.
> V sendmaily som to nastavil cez:
> @domain.com  admin na domain.com
> Pricom toto pravidlo malo najnizsiu prioritu.
> V postfixe kde mas vsetko v Mysql mam nasledovne veci v main.cf
> virtual_maps = mysql:/etc/postfix/virtual.cf
> 
> virtual.cf vyzera nasledovne
> user = postfix
> password = secret
> dbname = mail
> table = virtual
> select_field = goto
> where_field = address
> hosts = localhost
> 
> ked pridam to tabulky virtual zaznam
> '@domain.com', 'admin na domain.com'
> tak tu ma toto pravidlo najvyssiu prioritu, cize na domain.com nikdo
> nedsatne mail. Vsetko ide iba admin na domain.com. Vsetko co potrebujem
> je nastavit tu prioritu tak ako to je v sendmaily. 

man 5 virtual:

 @domain address, address, ...
           Mail for any user in domain is redirected to
           address.  This form has the lowest precedence.
	             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  

aky typ virtual sa pouziva? postfix-style alebo sendmail-style?
podla toho treba pridat domain.com hocico pre postfix-style a neuvadzat
do mydestination ...

> Skusal som pridat
> aj zaznam
> 'domain.com', 'admin na domain.com' ale to nemalo nic nenastavilo. V
> mysql logoch
> som zistil, ze postfix sa implicitne pozera po zazname s id
> '@domain.com' a ked
> ho najde hned ho pouzije. Ako riesit tento problem?

# The luser_relay parameter specifies an optional destination address
# for unknown recipients.  By default, mail for unknown local recipients
# is bounced.
#
# The following expansions are done on luser_relay: $user (recipient
# username), $shell (recipient shell), $home (recipient home directory),
# $recipient (full recipient address), $extension (recipient address
# extension), $domain (recipient domain), $local (entire recipient
# localpart), $recipient_delimiter. Specify ${name?value} or
# ${name:value} to expand value only when $name does (does not) exist.
#
# luser_relay works only for the default Postfix local delivery agent.
#
#luser_relay = $user na other.host
#luser_relay = $local na other.host
#luser_relay = admin+$local

-- 

5o   Peter.Mann at tuke.sk
     KLFMANiK ICQ 12491471
         PM2185-RIPE


Další informace o konferenci Sendmail