Re: Is it possible to send email by copying a file or files to an appropriate queue directory?

2022-03-23 Thread Demi Marie Obenour
On 3/22/22 11:27, João Silva wrote:
> 
> On 22/03/2022 14:57, Edward Sandberg wrote:
>> You could use inotify to monitor a directory and trigger a script to 
>> send the mail.
>>
>> Here is a very simple example content of such an email file, but they 
>> get much more complex.
>>
>> To: f...@bar.com
>> From: b...@foo.com
>> Subject: example email
>>
>> Hello World!
>>
>> If the files are valid email files with headers you could just pipe 
>> them to sendmail.
>>
>> If the files are not valid emails with headers then you could send 
>> them as attachments. Something like the python module envelope would 
>> be a simple way to do this: https://pypi.org/project/envelope/
> 
> The following code (function) takes a bytesIO object and attaches it to 
> an email.
> 
> A warning about inotify and python, if the rate of writing new files to 
> a directory is too high python may not keep up to it there are events 
> that may be "lost". I have found it the hard way.

This is not specific to Python.  It’s a general limitation of the
inotify interface, and is necessary to avoid a trivial denial of
service by being slow to consume events.  Inotify does tell you when
events have been lost, though, which allows you to resynchronize.
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)

OpenPGP_0xB288B55FFF9C22C1.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


SASL authentication question

2022-03-23 Thread Sam R
I have configured Postfix with Cyrus-sasl to send mail with Active
Directory authentication.
I'm very happy with the result, my users log in with a firstname.lastname
user and their Windows password.
But I have a router that needs to send mails and that has only one field
that is used for both the login and the sender's email address.
So here is my question, I am looking for a server equivalent to this client
option smtp_sasl_password_maps, to add in a file the adapted login.
Do you have an idea?
Samuel


Muliple mail delivery

2022-03-23 Thread Homer Wilson Smith



Dear Folks,

Is there any easy way to get a single instance of
postfix running on a single server to deliver a piece of mail
to a two different but identical mailboxes on the same server.

For example to home/user/Maildir and home2/user/Maildir on a different
partitiion?

Want a redundant copy of all incoming mail in case drive fails.

Raid is too dangerous, if FAT gets corrupted it destroys all disks in
the raid.

Presently I got 3 drives rsyncing from the mail drive repeatedly 
through out the day.  It works...


Thanks for tolerating my stupidity.

Homer


Homer Wilson Smith   Clean Air, Clear Water,Art Matrix - Lightlink
(607) 277-0959   A Green Earth, and Peace,  Internet, Ithaca NY
ho...@lightlink.com  Is that too much to ask?   http://www.lightlink.com


Re: Muliple mail delivery

2022-03-23 Thread Dan Mahoney



> On Mar 23, 2022, at 2:52 PM, Homer Wilson Smith  
> wrote:
> 
> 
>Dear Folks,
> 
>Is there any easy way to get a single instance of
> postfix running on a single server to deliver a piece of mail
> to a two different but identical mailboxes on the same server.
> 
>For example to home/user/Maildir and home2/user/Maildir on a different
> partitiion?

Aliases can take a comma-separated list of file locations, in addition to 
pipes, usernames, and the like.  That solves what you are asking for.

How would you propose to handle syncing the state of which messages have been 
marked read, etc?

-Dan

Re: Muliple mail delivery

2022-03-23 Thread Homer Wilson Smith

Aliases can take a comma-separated list of file locations, in addition to 
pipes, usernames, and the like.  That solves what you are asking for.

How would you propose to handle syncing the state of which messages have been 
marked read, etc?


 NO idea, the idea thought is simply to have a continuity of mail 
coming in.  The rsync idea may still be useful.


 Thanks  Homer


-Dan