Schrift
[thread]9807[/thread]

Postfix (illegal adress syntax)



<< >> 6 Einträge, 1 Seite
Froschpopo
 2007-01-09 11:50
#95789 #95789
User since
2003-08-15
2653 Artikel
BenutzerIn
[default_avatar]
Ich möchte scriptgesteuert (Perl) eine Mail über den eigenen Postfix versenden der mit einer Standleitung ein "Stand-Alone-Mailserver" ist. Ich habe ein bisschen rumgebastelt und plötzlich, ich weiss nicht mehr was ich falsch gemacht habe, bekomme ich folgende Meldung:
Code: (dl )
1
2
3
4
Jan 9 10:20:04 localhost postfix/smtpd[350]: connect from localhost[127.0.0.1]
Jan 9 10:20:04 localhost postfix/smtpd[350]: warning: Illegal address syntax from localhost[127.0.0.1] in RCPT command:
Jan 9 10:20:04 localhost postfix/smtpd[350]: warning: localhost[127.0.0.1] sent non-SMTP command: Subject:
Jan 9 10:20:04 localhost postfix/smtpd[350]: disconnect from localhost[127.0.0.1]
Witzigerweise kann ich mit Kmail (SuSE 10) problemlos Mails auch an andere Mailserver versenden. leider kann ich ja nicht einsehen, worin der Unterschied zwischen Net::SMTP und Kmail besteht bzw was Kmail anders macht. So wird die Mail mit Net::SMTP versandt:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
 sub connect_smtp { 
my $args = shift;
my $smtp = Net::SMTP->new("localhost");
$smtp->mail("$args->{FROM}");
$smtp->to($args->{ADR});
$smtp->data();
$smtp->datasend("Subject: $args->{TITLE}\n");
$smtp->datasend("To: $args->{ADR}\n");
$smtp->datasend("\n"); $smtp->datasend("Text");
$smtp->dataend();
$smtp->quit;
}
Am Perlscript kann es aber nicht liegen, da ich daran nichts verändert habe und vorher alles problemlos verlief.
mydomain =domain.net
readme_directory = /usr/share/doc/packages/postfix/README_FILES
inet_protocols = all
biff = no
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
virtual_maps = hash:/etc/postfix/virtual
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
myhostname = $mydomain
program_directory = /usr/lib/postfix
inet_interfaces = all
masquerade_domains =
mydestination = $mydomain, localhost
defer_transports =
disable_dns_lookups = no
relayhost =
bloonix
 2007-01-09 12:01
#95790 #95790
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
Mach doch mal ein Dump von $args. Vielleicht gibt das Aufschluss.\n\n

<!--EDIT|opi|1168336893-->
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.
Froschpopo
 2007-01-09 12:21
#95791 #95791
User since
2003-08-15
2653 Artikel
BenutzerIn
[default_avatar]
der fehler lag woanders!! Danke trotzdem fürs lesen ganz herzlich. Mein Script wird langsam etwas zu lang (57kb)
bloonix
 2007-01-09 12:50
#95792 #95792
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
Wo lag der Fehler denn? Wenn ich schon so fleissig lese, möchte ich auch
eine Lösungsbeschreibung von dir. =)
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.
Froschpopo
 2007-01-09 20:00
#95793 #95793
User since
2003-08-15
2653 Artikel
BenutzerIn
[default_avatar]
$args war leer!
GwenDragon
 2007-01-09 20:21
#95794 #95794
User since
2005-01-17
14538 Artikel
Admin1
[Homepage]
user image
[quote=Froschpopo,09.01.2007, 19:00]$args war leer![/quote]
Sowas sollte einer aber in der Sub abprüfen ;)

Code: (dl )
1
2
return if @_ == 0;
my $args = shift;
die Drachin, Gwendolyn


Unterschiedliche Perl-Versionen auf Windows (fast wie perlbrew) • Meine Perl-Artikel

<< >> 6 Einträge, 1 Seite



View all threads created 2007-01-09 11:50.