amavisd-new, read_hash and problem with a dot in localpart of emailaddress

Mark Martinec via amavis-users amavis-users at amavis.org
Sat Sep 28 00:12:36 CEST 2013


Guido,

... moreover:

 > So we change our entry in the external File to enclose the complete
 > Email-Address with a  ' sign or a " sign.
 > Example:
 >   'guido.kuehler at steinel.at' => 1,

That's not the right syntax for a file to be read
by read_hash(). The following describes the syntax
as understood by read_hash, no quotes and no '=>' :


# read an associative array (=Perl hash) (as used in lookups) from
# a file; may be called from amavisd.conf
#
# Format: one key per line, anything from '#' to the end of line
# is considered a comment, but '#' within correctly quoted RFC 5321
# addresses is not treated as a comment introducer (e.g. a hash sign
# within "strange # \"foo\" address"@example.com is part of the string).
# Lines may contain a pair: key value, separated by whitespace,
# or key only, in which case a value 1 is implied. Trailing whitespace
# is discarded (iff $trim_trailing_space_in_lookup_result_fields),
# empty lines (containing only whitespace or comment) are ignored.
# Addresses (lefthand-side) are converted from RFC 5321 -quoted form
# into internal (raw) form and inserted as keys into a given hash.
# NOTE: the format is partly compatible with Postfix maps (not aliases):
#   no continuation lines are honoured, Postfix maps do not allow
#   RFC 5321 -quoted addresses containing whitespace, Postfix only
#   allows comments starting at the beginning of a line.

Mark




More information about the amavis-users mailing list