From: Loki Harfagr on
Thu, 05 Aug 2010 03:52:21 -0700, RICCARDO did cat :

> On 5 Ago, 12:00, RICCARDO <ric.castell...(a)alice.it> wrote:
>> On 5 Ago, 10:37, ska <s...(a)mail.inf.fh-brs.de> wrote:
>>
>>
>>
>> > RICCARDO wrote:
>> > > On my last debian, which I'm using as smart, I'm not able to send
>> > > emails to specific domain.
>> > > In logs I can see
>> > > E.g.
>>
>> > > 1)on /tmp/ folder:
>> > > ls -l  | sendmail r.castell...(a)example.com
>>
>> > > msg is sent and in logs, on row where is written recipient "to",
>> > > there is written relay=212.102.33.45
>>
>> > > 2) on /
>> > > ls -l  | sendmail r.castell...(a)example.com
>>
>> > > msg is NOT sent and in logs, on row where is written recipient
>> > > "to", there is written relay=127.0.0.1 !
>>
>> > Actually, there should be two log lines, because you are submitting
>> > the message to the local sendmail server first, which then relays the
>> > message further on.
>>
>> > What does "mailq" says? Add "-v" option for verbose operation.
>>
>> > You might try "sendmail -Am", that should mean to run as server
>> > instead of submission agent, but I may be wrong.
>>
>> > Regards, ska
>>
>> With:
>> ls -l  |  sendmail -v castell...(a)test.it
>>
>> I got block during "data" stage:
>>
>> 250-PIPELINING
>> 250-8BITMIME
>> 250-SIZE 5242880
>> 250-ETRN
>> 250-DELIVERBY
>> 250 HELP>>> MAIL From:<r...(a)example.it> SIZE=10797
>>
>> 250 2.1.0 <r...(a)example.it>... Sender ok>>> RCPT
>> To:<castell...(a)test.it>
>> >>> DATA
>>
>> 250 2.1.5 <castell...(a)test.it>... Recipient ok 354 Enter mail, end with
>> "." on a line by itself
>>
>> >>> .
>>
>> While whith
>> ls -l  |  sendmail -Am castell...(a)test.it went rights !!! It's sent.
>>
>> Where is problem ?
>
> It's very strange !!!
> now it works with "ls -l | sendmail castell...(a)example.com" too.
>
> I tried to put outside of my dmz network a windows client, using telnet
> and it worked.
>
> I tried, with a windows client inside my DMZ network, using telnet and
> it worked.
>
> From my smartHost, which is in from both ext. and int. network, I gave
> same commands, but nothing !
>
> Then I tried with -Am , it worked
>
> Then I tried again with "ls -l | sendmail castell...(a)test.it " and now
> worked !!!!
> What's it happening ?

funny hypothesis: suspicious chars in the ls -l output?

1. can you get the same errors if instead of 'ls -l' you pipe something less
dangerous, like 'date' or 'free -m' ?

2. in all the places where you tested your 'ls -l' could you check that
the output has chars in the x20-127 range?
From: RICCARDO on
On Aug 5, 4:32 pm, Loki Harfagr <l...(a)thedarkdesign.free.fr.INVALID>
wrote:
> Thu, 05 Aug 2010 03:52:21 -0700, RICCARDO did cat :
>
>
>
> > On 5 Ago, 12:00, RICCARDO <ric.castell...(a)alice.it> wrote:
> >> On 5 Ago, 10:37, ska <s...(a)mail.inf.fh-brs.de> wrote:
>
> >> > RICCARDO wrote:
> >> > > On my last debian, which I'm using as smart, I'm not able to send
> >> > > emails to specific domain.
> >> > > In logs I can see
> >> > > E.g.
>
> >> > > 1)on /tmp/ folder:
> >> > > ls -l  | sendmail r.castell...(a)example.com
>
> >> > > msg is sent and in logs, on row where is written recipient "to",
> >> > > there is written relay=212.102.33.45
>
> >> > > 2) on /
> >> > > ls -l  | sendmail r.castell...(a)example.com
>
> >> > > msg is NOT sent and in logs, on row where is written recipient
> >> > > "to", there is written relay=127.0.0.1 !
>
> >> > Actually, there should be two log lines, because you are submitting
> >> > the message to the local sendmail server first, which then relays the
> >> > message further on.
>
> >> > What does "mailq" says? Add "-v" option for verbose operation.
>
> >> > You might try "sendmail -Am", that should mean to run as server
> >> > instead of submission agent, but I may be wrong.
>
> >> > Regards, ska
>
> >> With:
> >> ls -l  |  sendmail -v castell...(a)test.it
>
> >> I got block during "data" stage:
>
> >> 250-PIPELINING
> >> 250-8BITMIME
> >> 250-SIZE 5242880
> >> 250-ETRN
> >> 250-DELIVERBY
> >> 250 HELP>>> MAIL From:<r...(a)example.it> SIZE=10797
>
> >> 250 2.1.0 <r...(a)example.it>... Sender ok>>> RCPT
> >> To:<castell...(a)test.it>
> >> >>> DATA
>
> >> 250 2.1.5 <castell...(a)test.it>... Recipient ok 354 Enter mail, end with
> >> "." on a line by itself
>
> >> >>> .
>
> >> While whith
> >> ls -l  |  sendmail -Am castell...(a)test.it went rights !!! It's sent.
>
> >> Where is problem ?
>
> > It's very strange !!!
> > now it works with  "ls -l  | sendmail castell...(a)example.com" too.
>
> > I tried to put outside of my dmz network a windows client, using telnet
> > and it worked.
>
> > I tried, with a windows client inside my DMZ network, using telnet and
> > it worked.
>
> > From my smartHost, which is in from both ext. and int. network, I gave
> > same commands, but nothing !
>
> > Then I tried with -Am , it worked
>
> > Then I tried again with "ls -l  |  sendmail castell...(a)test.it " and now
> > worked !!!!
> > What's it happening ?
>
> funny hypothesis: suspicious chars in the ls -l output?
>
> 1. can you get the same errors if instead of 'ls -l' you pipe something less
> dangerous, like 'date' or 'free -m' ?
>
> 2. in all the places where you tested your 'ls -l' could you check that
> the output has chars in the x20-127 range?

ok, I'll check it , but suddenly today also ls -l | sendmail ... go
rights ! i modified nothing,
it was abot 5 days that I had problem but now...
Sendmai is mystere !
Can I debug Data command ? I noted that in data stage I didn't command
prompt so connetion went timeout
From: ska on
RICCARDO wrote:

> > I got block during "data" stage:
> >
> > 250-PIPELINING

Which server do you connect to at this point? Is it your local server?
Consult its log entries to.

> > >>> .
> >

When you wrote "I got block during "data" stage:" do you mean that
there is no response from the server for the "." command?
BTW: You might use -oi to let sendmail handle single "." lines in the
input stream.

> Then I tried again with "ls -l | sendmail castell...(a)test.it " and
> now worked !!!!
> What's it happening ?

Check your local server logs. The ones of the recieving side. And
check if the mails are deferred for some reason (IMHO there is a 5min
timeout somewhere, so wait some time) and, hence, queued afterwards.

Regards, ska
From: RICCARDO on


ska ha scritto:
> RICCARDO wrote:
> > On my last debian, which I'm using as smart, I'm not able to send
> > emails to specific domain.
> > In logs I can see
> > E.g.
> >
> > 1)on /tmp/ folder:
> > ls -l | sendmail r.castellani(a)example.com
> >
> > msg is sent and in logs, on row where is written recipient "to", there
> > is written relay=212.102.33.45
> >
> > 2) on /
> > ls -l | sendmail r.castellani(a)example.com
> >
> > msg is NOT sent and in logs, on row where is written recipient "to",
> > there is written relay=127.0.0.1 !
>
> Actually, there should be two log lines, because you are submitting
> the message to the local sendmail server first, which then relays the
> message further on.
>
> What does "mailq" says? Add "-v" option for verbose operation.
>
> You might try "sendmail -Am", that should mean to run as server
> instead of submission agent, but I may be wrong.
>
> Regards, ska

> Which server do you connect to at this point? Is it your local server?
> Consult its log entries to.

I'm connecting directly from my SMART_HOST mail server (MX record)
which is both on ext. and on int. network
I have a my domain and this machine has both a pubblic IP address and
a private address.
The msg goes into queue (infact you can see it by 'mailq') because, I
suppose, in DATA stage there is a timeout.
I can see this log:
SYSERR(root): timeout writing message to mx1.domain.com: Resource
temporarily unavailable
SYSERR(root): timeout writing message to mx2.domain.com: Resource
temporarily unavailable
SYSERR(root): timeout writing message to mx3.domain.com: Resource
temporarily unavailable
....
SYSERR(root): timeout writing message to mx6.domain.com: Resource
temporarily unavailable


>When you wrote "I got block during "data" stage:" do you mean that
> there is no response from the server for the "." command?

I type "." character to terminate message body but nothing happens,
that is
I can continue to write on session terminal but I don't see answer; I
usually waited
2-3 miuntes then I aborted connection.
Perhaps I should sniffer packets on connection to be sure there is no
answer.


>You might use -oi to let sendmail handle single "." lines in the
> input stream.

I can check single line with this option ? That's a good idea !


> Check your local server logs. The ones of the recieving side. And
> check if the mails are deferred for some reason (IMHO there is a 5min
> timeout somewhere, so wait some time) and, hence, queued afterwards.


The ones of the recieving side ? I don't understand but 'm trying to
send msg.
My messages are deferred !