Use of smtpd_reject_unlisted_sender
On these days where theft of credentials of legitimate e-mail server users in order to send spam checking the MAIL FROM: using smtpd_reject_unlisted_sender would be a helping Postfix feature. Perhaps it is a misunderstanding from my side about the actual meaning of parameter smtpd_reject_unlisted_sender but if smtpd_reject_unlisted_sender = yes is present on main.cf... How is it possible for an user to send an mail from an unknown sender addresses neither listed in virtual nor canonical? The user is connecting to the smtp server and authenticates itself correctly but he's sending e-mails from an absolutely alien e-mail address (both user and domain part of the e-mail address) If the authenticated user tries to send e-mail from a non-existent e-mail address (user part) of a local domain the e-mail is rejected but if he/she uses a non-existent e-mail address of an alien domain the e-mail message is accepted by smtpd server. Shouldn't ALL those mails be rejected by smtpd? -- Bernardo Pons
Is it possible to manually copy files in incoming directory?
If, for some reason, the files containing messages present in the incoming directory had to be moved to a temp directory, is it possible to copy them back to the incoming directory in order to be re-queued by Postfix? -- Bernardo Pons
Re: Is it possible to manually copy files in incoming directory?
Well, rather than moved, all files into the incoming directory were copied to a different folder in the same filesystem. So the files, and thus the inodes, are different from the originals. The filenames are preserved. The ownership was set back to the original (user and group running Postfix) Permissions for these files are the originals (rwx--). Postfix service was stopped before. 2013/10/9 Wietse Venema wie...@porcupine.org Viktor Dukhovni: On Wed, Oct 09, 2013 at 06:09:31PM +0200, Bernardo Pons wrote: If, for some reason, the files containing messages present in the incoming directory had to be moved to a temp directory, is it possible to copy them back to the incoming directory in order to be re-queued by Postfix? The details depend on what you mean by moved to. Can you give a precise description of what was done to the original incoming queue files: - which queue files were selected for relocation? - how were they relocated ? - where did they end up (directory in the same filesystem or different filesystem)? - were file permission bits preserved? - were the leaf file names preserved? If the target filesystem is the same as the original, and the incoming files were simply renamed (keeping the same inode, permissions, and leaf file name) into a holding directory on the same filesystem, you can simply rename(2) them back into incoming/. [ I sometimes use: perl -e 'rename(@ARGV);' $src $dst, to make sure I'm doing a rename and not a copy. The mv(1) command will on many systems perform a copy and unlink when moving files across filesystems. ] If moving files between different file systems (directories under different mount points), Postfix should be stopped otherwise it may read a queue file before it is complete. Wietse -- -- Bernardo Pons
Re: Is it possible to manually copy files in incoming directory?
It worked! Thank you Wietse Viktor for your help. Great piece of software Postfix! 2013/10/9 Wietse Venema wie...@porcupine.org Bernardo Pons: Well, rather than moved, all files into the incoming directory were copied to a different folder in the same filesystem. So the files, and thus the inodes, are different from the originals. The filenames are preserved. The ownership was set back to the original (user and group running Postfix) Permissions for these files are the originals (rwx--). Postfix service was stopped before. Good. Also stop Postfix before copying/moving/whatever the files into place. I suggest placing them into the maildrop directory. Before starting postfix, run the postsuper command until it stops reporting file name changes. Wietse 2013/10/9 Wietse Venema wie...@porcupine.org Viktor Dukhovni: On Wed, Oct 09, 2013 at 06:09:31PM +0200, Bernardo Pons wrote: If, for some reason, the files containing messages present in the incoming directory had to be moved to a temp directory, is it possible to copy them back to the incoming directory in order to be re-queued by Postfix? The details depend on what you mean by moved to. Can you give a precise description of what was done to the original incoming queue files: - which queue files were selected for relocation? - how were they relocated ? - where did they end up (directory in the same filesystem or different filesystem)? - were file permission bits preserved? - were the leaf file names preserved? If the target filesystem is the same as the original, and the incoming files were simply renamed (keeping the same inode, permissions, and leaf file name) into a holding directory on the same filesystem, you can simply rename(2) them back into incoming/. [ I sometimes use: perl -e 'rename(@ARGV);' $src $dst, to make sure I'm doing a rename and not a copy. The mv(1) command will on many systems perform a copy and unlink when moving files across filesystems. ] If moving files between different file systems (directories under different mount points), Postfix should be stopped otherwise it may read a queue file before it is complete. Wietse -- -- Bernardo Pons -- -- Bernardo Pons
debug_peer_level valid values
Hi, Does anybody know which are the valid values for debug_peer_level parameter? Thanks a lot. -- Bernardo Pons
adding headers for bcc recipients
Hi all, I'm looking for a way to add a header to the messages before they are delivered to a multidrop mailbox with virtual aliases. After searching the postfix-users list archives I've found that this subject has been already discused here and I've found a message from Zoltan Balogh that seemed to be exactly what I needed: --8 So basically I just need to help fetchmail guessing the correct envelope recipients by appending X-Envelope-To (or similar header entry) to the email message. I did the following: smtpd_recipient_restrictions = ... check_recipient_access pcre:/etc/postfix/recipient_access /etc/postfix/check_recipient_access: /(@somedomain.com)/ PREPEND X-Envelope-To: $1 --8 But it doesn't work for me. No header is added at all! Maybe it is because I use LMTP as a delivery method from Postfix to Cyrus? Should I place the check_recipient_access rule in another phase of smtp check instead of smtpd_recipient_restrictions? Thanks -- Bernardo Pons