Postfix - Passing email to a script

akash rao akash.rao.ind at gmail.com
Sat Jan 30 07:24:20 UTC 2021


yeah there is the trouble; they email and when you reply they drop a 
script which drains battery; becomes a big problem online; then you 
contact someone who deletes the script for you for which you either pay 
or remain loyal!

especially when trade wars are going on inside the group ...

On 30/01/21 5:17 am, Mike Marchywka wrote:
> On Fri, Jan 29, 2021 at 06:58:29PM +0000, David Fletcher wrote:
>> Hi all,
>>
>> I'm developing a solution for distributing GPX route files to those who
>> want to use them on smartphones instead of paper printed directions for
>> navigating suggested routes with a classic car club. My idea is to give
>> to anybody who wants the GPX file an email address which will trigger
>> my mail server to send a reply with the GPX file attached.
> I'm not sure what exists for this but I wrote my own thing
> that is basically for what you suggest. Right now, I'm using
> fetchmail and some scripts to monitor a yahoo account and
> send back camera or other information from a remote machine
> with no fixed IP address using neomutt. I'm in the process of making
> a more integrated c++ version using a library I made
> from neomutt as well as libetpan. I call the thing "mikemail"
> for now and the only reason to discuss it so far
> is this thing on collecting diet diary information and
> returning reports,
>
> https://www.linkedin.com/posts/marchywka_adding-artwork-activity-6748265617696059392-b3Ej
>
> Thee are probably a lot of systems that do this as automated
> email echanges are common. However, I got started on a bunch of
> pieces and it seemed useful to integrate it and get rid
> of things like fetchmail.
>
>
>
>> At the moment I have working from the aliases file:-
>> emailexperiments: "|/home/emailexperiments/autoreplytesting"
>>
>> which calls the script
>> #!/bin/bash
>>
>> read header
>> fromaddr=$(echo $header | cut -d' ' -f 2)
>> sendEmail \
>>      -q\
>>      -f noreply at thefletchers.net\
>>      -t $fromaddr\
>>      -u "Autoreply testing"\
>>      -m Autoreply from server
>>
>> Put together from results of various Google searches. This appears to
>> be working so far, tested by me from my own server and a friend using
>> gmail. All I then need to do is add the attachment to the sendEmail
>> call.
>>
>> The read command appears (IANAE) to fetch the next line from the email
>> with each call. So far that first line contains
>>  From address at example.com etc etc
>> BUT my question is, will it ALWAYS be the first line that contains the
>> sender's address or do I need to use a loop to make certain I always
>> find it?
>>
>> Thanks as always to all those who know and understand more than I do!
>>
>> Dave
>>
>>
>> -- 
>> ubuntu-users mailing list
>> ubuntu-users at lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users




More information about the ubuntu-users mailing list