[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [NETVAERK] Postfix forward mail til script



Allan Kok wrote:
"Jesper Lund" <sslug@sslug> skrev i en meddelelse news:sslug@sslug
Jeg har et setup som ligner det som er beskrevet i denne guide: http://www.linux-support.dk/index.php?id=1

Postfix med virtuale mail-accounts.
Kan jeg oprette en mail-addresse som bliver forwarded direkte til et script f.eks perl?

Det korte svar: Ja.

Det lidt længere er: Du skal oprette et virtelt alias i virtual_alias_maps, som redirecter til sslug@sslug - Så laver du et entry i alias_maps: perlscript -> "| /sti/til/perlscript"


Jeg har i min mysql oprettet i min forwarding tabel: source: sslug@sslug dist: perlscript
I aliases har jeg:
# /etc/aliases
perlscript -> "| /root/mail.pl"



det virket ikke, jeg får en mail tilbage med unknown user: "perlscript"
og når jeg hash'er min aliases med newaliases får denne fejl: postalias: warning: /etc/aliases, line 2: need name:value pair


Hvorkan fejlen være!

mvh
Allan



Jeg har klippet lidt i min opsætning med virtuel opsætning af postfix, dog ikke med mysql, kun flat files.... dette er et eksempel på hvordan jeg har lavet autoreply - det er ikke serligt kønt, men det virker!!

master.cf

autoreply unix  -       n       n       -       -       pipe
   flags=F  user=nobody
   argv=/bin/bash /usr/local/bin/autoreply.sh $sender $recipient

---------------------------------------------------------------------------------
autoreply.sh

(
echo "From: `cat /home/mail_autoreply/$2_mailaddr `"
echo "To: $1"
echo "Subject: `cat /home/mail_autoreply/$2_mailaddr_header `"
echo "Content-Type: text"
cat /home/mail_autoreply/$2
) | /usr/sbin/sendmail -t


---------------------------------------------------------------------------------

i transport har jeg så dette:


autoreply.domain.dk autoreply:

---------------------------------------------------------------------------------
og i min virtual har jeg:

sslug@sslug sslug@sslug sslug@sslug


/Frank


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2007-07-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *