Hi,
I am trying to limit the number of outgoing messages a single local Unix user
(web hosting customer) can send in a single day.
My first thought was to create a policy server for this, but unfortuneately
Postfix does not supply the originating UID to the policy server, and the
"sender" field can be easily forged.
So I'm looking for a different way, and found Postdrop does have a
"authorized_submit_users" parameter.
The idea was to have that call a MySQL stored function that administers the
number of sent messages in the database, and returns a boolean indicating
wheter the user is allowed to send more messages.
Unfortuneately, that does not seem to work either.
When I create a config file with my database details, and add it to main.cf:
==
authorized_submit_users=mysql:/etc/postfix/mysql_outgoing_limit.cf
==
it gives an error when trying to send mail:
==
sendmail: fatal: unsupported dictionary type: mysql
==
This despite that MySQL support is built-in and postdrop is linked to
libmysqlclient:
==
# postconf -m
btree
cidr
environ
hash
mysql
nis
proxy
regexp
static
unix
# ldd /usr/sbin/postdrop
libmysqlclient.so.15 => /usr/local/lib/mysql/libmysqlclient.so.15
(0x00002aaaaaaba000)
libz.so.1 => /lib64/libz.so.1 (0x00002aaaaac31000)
libm.so.6 => /lib64/tls/libm.so.6 (0x00002aaaaad46000)
libdb-4.3.so => /usr/lib64/tls/libdb-4.3.so (0x00002aaaaae9d000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00002aaaab091000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00002aaaab1a7000)
libc.so.6 => /lib64/tls/libc.so.6 (0x00002aaaab2bb000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00002aaaab4e7000)
libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x00002aaaab620000)
/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
==
Is there any way to make postdrop support MySQL dictionaries, or to limit
locally sent e-mail another way?
--
Yours sincerely,
Floris Bos