Re: [exim] How to do this?

Top Pagina
Delete this message
Reply to this message
Auteur: W B Hacker
Datum:  
Aan: exim users
Onderwerp: Re: [exim] How to do this?
Alberto Garcia wrote:

> Hi,
> This is my first question to the list.
> Im looking for a solution to a simple problem.
> I have a domain ( for example garcia.org), and in this domain i have a
> lot of user, but i have one special user notify@???
> This user, send email to other user's at every domain (even to users in
> garcia.org).


Are all such users on your own server?

> I need that every email send by notify@??? can get a Delivery
> report if the mail was read.


Not possible, even if you had MUA's that would report 'read' vs
'deleted without being read' (as DaVinci mail on Novell MHS used
to do).

> The problem is that this funcionality isnt support by all clients
> (MUA's/MTA's).


Doesn't matter. Anyone can click a message, changing status to
'read' without actually reading it. Many MUA can be set to mark
a message read after a preset time-out, even if not opened,
and/or even when their local filter is transferring it to a
quarantine folder or the trash.

> For solve this, i need send for every message, a new email that anounce
> the posibilty of get a original message if you reply a message (like a
> subscription to a Mailing lists), and if the message is reply then send
> the original message and make a log entry with the date of delivery, ip
> and other relevant data.


For this, you will probably find it faster and easier to
implement by actually using a Mailing List Manager, such as
MailMan (widely used with Exim by others) or Ecartis (my
personal preference).

> I try to do this using a system filter but i get some errors.
> At end the system is like a reverseTDMA system or comercial systems like
> "productive mail" or others.


It isn't that you cannot do it in Exim, it's that MLM's have a
richer set of tools, including statistics, reports, per-user
configurable 'vacation' and other bounce handling, MIME and
reformating, easier header modification settings, etc.

As soon as you solve the first requirement you will start to
find a need for more of the features an MLM already has.

Another approach might be a click-through to a URI on an https
protected web-page with hit-source access stats and/or per-user
login with stats.

> I dont look for a system 100% safety, i look a system capable to get a
> Delievery report of every message with the "best effort" (as good as the
> smtp protocol can)


All you need for that is decent Exim log settings, optionally
cron'ed or scripted use of eximstats.

For valid users on your own server, you should have a very high
certainty of delivery, and an immediate response if not possible.

A report on the length of time since most recent POP/IMAP access
(nothing to do with Exim) might be all you need beyond that.

But as soon as you take other servers into account, an MLM
toolset is much more useful.

>
> The first "strike" to built a System filter:
>
> # Exim filter
> if error_message then finish endif
> logfile /var/spool/exim4/store/_LOGFILE
> logwrite "TO: ${local_part:$recipients} FROM:
> ${local_part:$sender_address}"
> testprint "${if exists{/var/spool/exim4/store/${local_part:$recipients}}
> {yes} {no}}"
> testprint "${local_part:$recipients}"
> if "${if
> exists{/var/spool/exim4/store/${local_part:$recipients}}{yes}{no}}" is
> "yes"
> then
> logwrite " ... relevant data ..."
> # i need do something to send the message store at
> var/spool/exim4/store/${local_part:$recipients} to the originator of
> current email
> fail
> finish
> elif "${local_part:$sender_address}" is "notify"
> then
> headers add "X-agarcia-org: ${hmac{md5}{mysecret}{$message_id}}
> $message_id "
> save /var/spool/exim4/store/${hmac{md5}{mysecret}{$message_id}}
> logwrite "$tod_log $message_id ${hmac{md5}{mysecret}{$message_id}}
> $recipients $sender_address $return_path $message_size"
> mail to $recipients
> from ${hmac{md5}{mysecret}{$message_id}}@???
> subject "Tienes un mensaje ${hmac{md5}{mysecret}{$message_id}} "
> finish
> # logwrite "NO Existe ${local_part:$recipients}"
> endif
> # logwrite "${if
> exists{/var/spool/exim4/store/${local_part:$recipients}}{yes}{no}}"
>
>
>
> Some idea about this?


Umhhh .... might be simpler to integrate GSM SMS and send a
heads-up?

>
> Thanks a lot, and excuse my english.


Igualmente, mi Castellano.

Nothing much wrong with the way you wrote the explanation.

Can't comment on the filter code - I've never studied or needed
a system filter. I would do the above with an SQL trigger, if
not entirely within Ecartis.

;-)


Bill Hacker