PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Logiciels d'hébergement > comp.mail.sendmail > Sendmail CLI calling to different port?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.mail.sendmail Configuring and using the BSD sendmail agent.

Sendmail CLI calling to different port?

Réponse
 
LinkBack Outils de la discussion
Vieux 25/09/2006, 19h04   #1
RickvanderZwet
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Sendmail CLI calling to different port?

My current setup invokes
a) a qmail server running at port 25
b) a sendmail testing server running at port 2525

-they are both configured to store the message in Maildir format in the
$USER/Maildir (qmail by default, sendmail using procmail)
-the both accept the same 'local domain' wzoeterwoude.net

sending mail to rick@wzoeterwoude.net (using telnet) at 127.0.0.1:25
works fine
sending mail to rick@wzoeterwoude.net (using telnet) at 127.0.0.1:2525
works fine as well

But now the problem; When invoking sendmail from the command line (cli)
(using echo "rick" | sendmail -dANSI -d0-99.127 rick@wzoeterwoude.net).
-It will first find out the mail is local (Line 260:280)
-But instread of using port 2525, it keeps using port 25 (Line 291:293)

Full debug can be found over here:
http://www.wzoeterwoude.net/~rick/de...mail_debug.txt

a) it there a way to fix this behaviour?
b) ut there a way to inject into the sendmail-queue directly, from the
cl?

Br,
/Rick

  Réponse avec citation
Vieux 25/09/2006, 22h13   #2
René Berber
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Sendmail CLI calling to different port?


RickvanderZwet wrote:

> My current setup invokes
> a) a qmail server running at port 25
> b) a sendmail testing server running at port 2525
>
> -they are both configured to store the message in Maildir format in the
> $USER/Maildir (qmail by default, sendmail using procmail)
> -the both accept the same 'local domain' wzoeterwoude.net
>
> sending mail to rick@wzoeterwoude.net (using telnet) at 127.0.0.1:25
> works fine
> sending mail to rick@wzoeterwoude.net (using telnet) at 127.0.0.1:2525
> works fine as well
>
> But now the problem; When invoking sendmail from the command line (cli)
> (using echo "rick" | sendmail -dANSI -d0-99.127 rick@wzoeterwoude.net).
> -It will first find out the mail is local (Line 260:280)
> -But instread of using port 2525, it keeps using port 25 (Line 291:293)
>
> Full debug can be found over here:
> http://www.wzoeterwoude.net/~rick/de...mail_debug.txt
>
> a) it there a way to fix this behaviour?


Parameter -OClientPortOptions=Port=2525

> b) ut there a way to inject into the sendmail-queue directly, from the cl?


Yes, take a look at mailx (http://heirloom.sourceforge.net/mailx.html)
and email (http://email.cleancode.org/) they both support using smtp on
a specified port.

HTH
--
René Berber

  Réponse avec citation
Vieux 26/09/2006, 21h17   #3
Per Hedeland
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Sendmail CLI calling to different port?

In article <1159218816.163795.225650@k70g2000cwa.googlegroups .com>
"=?iso-8859-1?B?UmVu6SBCZXJiZXI=?=" <rberber@mailandnews.com> writes:
>
>RickvanderZwet wrote:
>
>> My current setup invokes
>> a) a qmail server running at port 25
>> b) a sendmail testing server running at port 2525
>>
>> -they are both configured to store the message in Maildir format in the
>> $USER/Maildir (qmail by default, sendmail using procmail)
>> -the both accept the same 'local domain' wzoeterwoude.net
>>
>> sending mail to rick@wzoeterwoude.net (using telnet) at 127.0.0.1:25
>> works fine
>> sending mail to rick@wzoeterwoude.net (using telnet) at 127.0.0.1:2525
>> works fine as well
>>
>> But now the problem; When invoking sendmail from the command line (cli)
>> (using echo "rick" | sendmail -dANSI -d0-99.127 rick@wzoeterwoude.net).
>> -It will first find out the mail is local (Line 260:280)
>> -But instread of using port 2525, it keeps using port 25 (Line 291:293)


Yes, that's the SMTP port...

>> Full debug can be found over here:
>> http://www.wzoeterwoude.net/~rick/de...mail_debug.txt
>>
>> a) it there a way to fix this behaviour?


It's in FAQ 3.39 (www.sendmail.org/faq) - just that for the command-line
submission, you need to modify submit.mc (or whatever file is used to
build your /etc/mail/submit.cf).

>Parameter -OClientPortOptions=Port=2525


No, that binds the *source* port.

>> b) ut there a way to inject into the sendmail-queue directly, from the cl?

>
>Yes, take a look at mailx (http://heirloom.sourceforge.net/mailx.html)
>and email (http://email.cleancode.org/) they both support using smtp on
>a specified port.


Not what *I* would call "inject into the sendmail-queue directly" - I'd
say the only reasonable answer to the actual question is "no". I.e. of
course there is a way, it's just files in a directory after all, but you
don't want to go there (especially not if you need to ask about it:-).

--Per Hedeland
per@hedeland.org

  Réponse avec citation
Vieux 26/09/2006, 23h09   #4
RickvanderZwet
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Sendmail CLI calling to different port?

Per Hedeland schreef:

> In article <1159218816.163795.225650@k70g2000cwa.googlegroups .com>
> "=?iso-8859-1?B?UmVu6SBCZXJiZXI=?=" <rberber@mailandnews.com> writes:
> >
> >RickvanderZwet wrote:
> >
> >> My current setup invokes
> >> a) a qmail server running at port 25
> >> b) a sendmail testing server running at port 2525
> >>
> >> -they are both configured to store the message in Maildir format in the
> >> $USER/Maildir (qmail by default, sendmail using procmail)
> >> -the both accept the same 'local domain' wzoeterwoude.net
> >>
> >> sending mail to rick@wzoeterwoude.net (using telnet) at 127.0.0.1:25
> >> works fine
> >> sending mail to rick@wzoeterwoude.net (using telnet) at 127.0.0.1:2525
> >> works fine as well
> >>
> >> But now the problem; When invoking sendmail from the command line (cli)
> >> (using echo "rick" | sendmail -dANSI -d0-99.127 rick@wzoeterwoude.net).
> >> -It will first find out the mail is local (Line 260:280)
> >> -But instread of using port 2525, it keeps using port 25 (Line 291:293)

>
> Yes, that's the SMTP port...
>
> >> Full debug can be found over here:
> >> http://www.wzoeterwoude.net/~rick/de...mail_debug.txt
> >>
> >> a) it there a way to fix this behaviour?

>
> It's in FAQ 3.39 (www.sendmail.org/faq) - just that for the command-line
> submission, you need to modify submit.mc (or whatever file is used to
> build your /etc/mail/submit.cf).
>
> >Parameter -OClientPortOptions=Port=2525

>
> No, that binds the *source* port.
>

The solution is a bit different and catogorized under 'dirty hacks'
Looking at line
260 : --deliver, id=k8PHrT5f086918, mailer=relay, host=`[127.0.0.1]',
first user=`rick@wzoeterwoude.net'
gave me the tought of hacking the 'relay' thing into submit.mc a bit
Added this part (copy of original Mrelay, but after the $h port 2525)
MAILER_DEFINITIONS
Mrelay, P=[IPC], F=mDFMuXa8k, S=EnvFromSMTP/HdrFromSMTP,
R=MasqSMTP, E=\r\n, L=2040,
T=DNS/RFC822/SMTP,
A=TCP $h 2525
..
Then it works fine.


> >> b) ut there a way to inject into the sendmail-queue directly, from the cl?

> >
> >Yes, take a look at mailx (http://heirloom.sourceforge.net/mailx.html)
> >and email (http://email.cleancode.org/) they both support using smtp on
> >a specified port.

>
> Not what *I* would call "inject into the sendmail-queue directly" - I'd
> say the only reasonable answer to the actual question is "no". I.e. of
> course there is a way, it's just files in a directory after all, but you
> don't want to go there (especially not if you need to ask about it:-).
>

Including the fact that normal users cannot put files into the queue
directly. Otherwhise you might have a 'small' security problem ;-)
>
> --Per Hedeland
> per@hedeland.org


  Réponse avec citation
Vieux 27/09/2006, 07h51   #5
Per Hedeland
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Sendmail CLI calling to different port?

In article <1159308551.680590.277540@h48g2000cwc.googlegroups .com>
"RickvanderZwet" <rickvanderzwet@gmail.com> writes:
>Per Hedeland schreef:
>
>> >RickvanderZwet wrote:
>> >
>> >> Full debug can be found over here:
>> >> http://www.wzoeterwoude.net/~rick/de...mail_debug.txt
>> >>
>> >> a) it there a way to fix this behaviour?

>>
>> It's in FAQ 3.39 (www.sendmail.org/faq) - just that for the command-line
>> submission, you need to modify submit.mc (or whatever file is used to
>> build your /etc/mail/submit.cf).
>>
>> >Parameter -OClientPortOptions=Port=2525

>>
>> No, that binds the *source* port.
>>

>The solution is a bit different and catogorized under 'dirty hacks'
>Looking at line
> 260 : --deliver, id=k8PHrT5f086918, mailer=relay, host=`[127.0.0.1]',
>first user=`rick@wzoeterwoude.net'
>gave me the tought of hacking the 'relay' thing into submit.mc a bit
>Added this part (copy of original Mrelay, but after the $h port 2525)
>MAILER_DEFINITIONS
>Mrelay, P=[IPC], F=mDFMuXa8k, S=EnvFromSMTP/HdrFromSMTP,
>R=MasqSMTP, E=\r\n, L=2040,
> T=DNS/RFC822/SMTP,
> A=TCP $h 2525
>.
>Then it works fine.


Maybe it does, but clearly it's better to use the much "cleaner"
solution in the FAQ that I pointed you to. I.e. redefine only the port
in submit.mc, not the whole mailer definition - besides putting stuff in
the .mc that you don't really want there, your way results in having two
definitions of the relay mailer in the .cf file, which isn't really OK
(it's not documented which of the definitions that "wins").

--Per Hedeland
per@hedeland.org


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 00h16.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,16049 seconds with 13 queries