get rid of apache@localhost in received email headers

There is a good change that the foreign email servers will drop if the sender email headers are not properly formatted.
Anyway if you get apache@localhost in Received header (with postfix/apache/php), you can change the php.ini, sendmail_path program to use sendmail.postfix instead of sendmail binary.

like : sendmail_path = /usr/sbin/sendmail.postfix -t -i -f

./arun

Hylafax/FaxMail with unicode encoding

It is pretty hard to get unicode works with fax ..
here are some scripts that i used to get the unicode done for incoming html/text faxes.

HTML
vi /etc/hylafax/faxmail/text/html
#!/bin/bash
cp -pf $1 /tmp/email.html
/usr/bin/lynx -dump -display_charset=utf-8 /tmp/email.html > /tmp/html_txt
/usr/bin/uniprint -font /etc/hylafax/faxmail/Cyberbit.ttf -in /tmp/html_txt -out /tmp/html_txt.uni
cat /tmp/html_txt.uni|/etc/hylafax/faxmail/filter.pl
rm /tmp/email.html
rm /tmp/html_txt
rm /tmp/html_txt.uni


plain text

vi /etc/hylafax/faxmail/text/plain
#!/bin/sh
/usr/bin/uniprint -font /etc/hylafax/faxmail/Cyberbit.ttf -in $1 -out /tmp/plain_txt
# echo " "
# echo "showpage"
cat /tmp/plain_txt | /etc/hylafax/faxmail/filter.pl
$rm /tmp/plain_txt

filter.pl
#!/usr/bin/perl
# Read from the standard input
@text=;
$size=@text;
# Count the number of "showpage"
$count=0;
for($i=0;$i<=$size;$i++){if($text[$i] =~ /showpage/){$count++;}}
# Discard the last line that contain "showpage"
$num=1;
for($i=0;$i<=$size;$i++){
if($text[$i] =~ /showpage/){
if($num!=$count){$num++;}
else{$text[$i]=~s/showpage//g;}
}
print $text[$i];
}

working with “screen”

Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells). It is mainly useful to keep the sessions uninterrupted, especially when you run time consuming scripts.

$ screen
open a new session Ctrl+a+c
Scroll between sessions Ctrl+a+a

retain the sessions
$screen -dr

[Resolved] Postfix X-Authentication Warning

X-Authentication-Warning can appear on the mail header , when the user sending email is not trusted by the mail server. There is a chance that email are considered as spam because of this.

To fix it you can add the user to /etc/mail/trusted-users

If your system has forms that used to send email as apache user, you can add “apache” user to the trusted-users file.