Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[hylafax-users] notify - sends email notification to wrong TOADDR

365 views
Skip to first unread message

Stefan Krogmann

unread,
Nov 22, 2009, 2:24:26 PM11/22/09
to hylafa...@hylafax.org
Hello

hope that someone can help me with an issue regarding notification emails. I have hylafax-server 6.03 on Ubuntu 9.10 with an eximx4 mail server and capi4forhylafax with a AVM Fitz!Card B1 running. exim4 for runs as an satelitte smarthost.

Sending and recieving of faxes works fine. Over the FaxDispatch the recieved faxes will be send to a specific email address in the SENDTO parameter without any problems.

But the notification emails with the command

sendfax -n -D -dxxxxxxx /home/krogmann/Test.pdf

will be send to a email address which includes the local domain in the TOADDR. In the FaxNotify i couln'd define a specific SENDTO (FROMADDR, TOADDR) email address, so hylafax send the notification emails from FaxMaster to the user account of the sender of the fax. Thats the problem. On my Ubuntu box i have a local domain and i forward all emails over a smarthost to an external domain. So i work with aliases and email-addresses

How can i fix this or where and how can i define in the bin/notify script a fixed central FROMADDR and TOADDR email address. In the FaxNotify i couldn't set this, there is no parameter for that. The Return-Path of the sent emails is correct (see below), but the SENDTO address includes the wrong local domain:

I have played a little bit with the Notify script, but with out success.

Sending with sendmail over command line works as well.

Any help is welcome
Best regards
Stefan

Some informations:
Local Domain is: fritz.box
External Domain is: krogmann.de

The defined aliases for FaxMaster/SendUser and email-aliases have no effect.

email-aliases:

FaxMaster: f...@krogmann.de
krogmann: ste...@krogmann.de
etc.

My FaxNotify includes this:

RETURNFILETYPE=pdf;
TEMPLATE=de;

returned Mailer-Demon Email:

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

krog...@fritz.box
(ultimately generated from krog...@dropzone.fritz.box)
SMTP error from remote mail server after RCPT TO:<krog...@fritz.box>:
host smtp.mx18-sysproserver.de [78.138.89.35]:
550 5.1.2 <krog...@fritz.box>: Recipient address rejected:
Domain not found

------ This is a copy of the message, including all the headers. ------

Return-path: <f...@krogmann.de>
Received: from uucp by dropzone.fritz.box with local (Exim 4.69)
(envelope-from <f...@krogmann.de>)
id 1NCGp1-0001Lm-Nm
for krog...@dropzone.fritz.box; Sun, 22 Nov 2009 19:06:04 +0100
To: krog...@dropzone.fritz.box
Subject: Fax Auftrag 1 an 27800403 abgeschlossen
From: HylaFAX Empfang <f...@krogmann.de>
Mime-Version: 1.0
Content-Type: Multipart/Mixed; Boundary="NextPart5164"
Message-Id: <E1NCGp1-...@dropzone.fritz.box>
Date: Sun, 22 Nov 2009 19:06:03 +0100


____________________ HylaFAX(tm) Users Mailing List _______________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-us...@hylafax.org < /dev/null
*To learn about commercial HylaFAX(tm) support, mail sa...@ifax.com.*

Bodo Meissner

unread,
Nov 26, 2009, 5:44:21 PM11/26/09
to hylafa...@hylafax.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stefan Krogmann schrieb:


> Hello
>
> hope that someone can help me with an issue regarding notification
> emails. I have hylafax-server 6.03 on Ubuntu 9.10 with an eximx4 mail
> server and capi4forhylafax with a AVM Fitz!Card B1 running. exim4 for
> runs as an satelitte smarthost.
>
> Sending and recieving of faxes works fine. Over the FaxDispatch the
> recieved faxes will be send to a specific email address in the SENDTO
> parameter without any problems.
>
> But the notification emails with the command
>
> sendfax -n -D -dxxxxxxx /home/krogmann/Test.pdf
>
> will be send to a email address which includes the local domain in the
> TOADDR. In the FaxNotify i couln'd define a specific SENDTO (FROMADDR,
> TOADDR) email address, so hylafax send the notification emails from
> FaxMaster to the user account of the sender of the fax.

Hello Stefan,

the script fragment "FaxNotify" is sourced by the "notify" script. Read the "notify" script to understand what you can do in "FaxNotify". On my Debian system it is /var/spool/hylafax/bin/notify.

On my system with package hylafax-server 2:6.0.3-3 it contains this:

[...]
#
# Apply customizations. All customizable variables should
# be set to their non-customized defaults prior to this.
#
if [ -f etc/FaxNotify ]; then
# source notify preferences
. etc/FaxNotify
fi


## We process the NOTIFY_FAXMASTER first, because we want
## this to go without the attachemnts, if they are used
## Faxmaster goes to $TOADDR, but templates always use SENDTO
SENDTO="$TOADDR"
case "$NOTIFY_FAXMASTER:$WHY" in
[...]
esac

# We use SENDTO in the templates, but $mailaddr is the job
# param. We set this *after* FaxNotify is sourced, because
# some admins seem to play with mailaddr expecting it to change
# the destination of the nofify email
SENDTO="$mailaddr"
export SENDTO
[...]

> How can i fix this or where and how can i define in the bin/notify
> script a fixed central FROMADDR and TOADDR email address.

In FaxNotify you can modify "mailaddr" like this:

mailaddr=`echo $mailaddr|sed 's/@fritz\.box/@krogmann.de/'`

or

mailaddr=f...@bar.baz

or do more complicated things as you like.

This will solve your HylaFAX problem.


Another option might be to configure your Exim to fix the destination addresses.
This would be a more general solution that works in any case when your system might want to send an e-mail to your local users, e.g. killed vi session, cron jobs etc.


Bodo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksPBKcACgkQnMz9fgzDSqeDSgCeNID7qKMjmHcubQZfX2ugS5Ms
H8oAnilKD2lTtG9bE0ImC6PjQVb2i8l8
=4fAx
-----END PGP SIGNATURE-----

0 new messages