Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.networking > #2248 > unrolled thread
| Started by | Ferrous Cranus <nikos@superhost.gr> |
|---|---|
| First post | 2013-09-05 19:11 +0300 |
| Last post | 2013-09-09 01:57 +0200 |
| Articles | 20 on this page of 45 — 7 participants |
Back to article view | Back to comp.os.linux.networking
Trying to utilize mailx to send mail via apython script Ferrous Cranus <nikos@superhost.gr> - 2013-09-05 19:11 +0300
Re: Trying to utilize mailx to send mail via apython script Jorgen Grahn <grahn+nntp@snipabacken.se> - 2013-09-05 18:13 +0000
Re: Trying to utilize mailx to send mail via apython script Ferrous Cranus <nikos@superhost.gr> - 2013-09-06 09:19 +0300
Re: Trying to utilize mailx to send mail via apython script Jorgen Grahn <grahn+nntp@snipabacken.se> - 2013-09-06 08:50 +0000
Re: Trying to utilize mailx to send mail via apython script Ferrous Cranus <nikos@superhost.gr> - 2013-09-06 12:06 +0300
Re: Trying to utilize mailx to send mail via apython script "Jonathan N. Little" <lws4art@gmail.com> - 2013-09-06 14:10 -0400
Re: Trying to utilize mailx to send mail via apython script Ferrous Cranus <nikos@superhost.gr> - 2013-09-07 08:33 +0300
Re: Trying to utilize mailx to send mail via apython script "Jonathan N. Little" <lws4art@gmail.com> - 2013-09-07 08:33 -0400
Re: Trying to utilize mailx to send mail via apython script Ferrous Cranus <nikos@superhost.gr> - 2013-09-07 23:24 +0300
Re: Trying to utilize mailx to send mail via apython script "Jonathan N. Little" <lws4art@gmail.com> - 2013-09-07 16:54 -0400
Re: Trying to utilize mailx to send mail via apython script Ferrous Cranus <nikos@superhost.gr> - 2013-09-08 09:58 +0300
Re: Trying to utilize mailx to send mail via apython script Ferrous Cranus <nikos@superhost.gr> - 2013-09-08 10:57 +0300
Re: Trying to utilize mailx to send mail via apython script "Jonathan N. Little" <lws4art@gmail.com> - 2013-09-08 10:11 -0400
Re: Trying to utilize mailx to send mail via apython script Ferrous Cranus <nikos@superhost.gr> - 2013-09-08 17:16 +0300
Re: Trying to utilize mailx to send mail via apython script Todd <Todd@invalid.invalid> - 2013-09-08 18:23 -0700
Re: Trying to utilize mailx to send mail via apython script Todd <Todd@invalid.invalid> - 2013-09-08 18:35 -0700
Re: Trying to utilize mailx to send mail via apython script "Jonathan N. Little" <lws4art@gmail.com> - 2013-09-09 17:11 -0400
Re: Trying to utilize mailx to send mail via apython script Todd <Todd@invalid.invalid> - 2013-09-09 14:40 -0700
Re: Trying to utilize mailx to send mail via apython script "Jonathan N. Little" <lws4art@gmail.com> - 2013-09-09 18:15 -0400
Re: Trying to utilize mailx to send mail via apython script David Brown <david.brown@removethis.hesbynett.no> - 2013-09-08 16:42 +0200
Re: Trying to utilize mailx to send mail via apython script Ferrous Cranus <nikos@superhost.gr> - 2013-09-08 18:41 +0300
Re: Trying to utilize mailx to send mail via apython script Whiskers <catwheezel@operamail.com> - 2013-09-08 17:56 +0100
Re: Trying to utilize mailx to send mail via apython script Ferrous Cranus <nikos@superhost.gr> - 2013-09-09 11:09 +0300
Re: Trying to utilize mailx to send mail via apython script Whiskers <catwheezel@operamail.com> - 2013-09-09 21:31 +0100
Re: Trying to utilize mailx to send mail via apython script Jorgen Grahn <grahn+nntp@snipabacken.se> - 2013-09-09 19:35 +0000
Re: Trying to utilize mailx to send mail via apython script Todd <Todd@invalid.invalid> - 2013-09-06 00:22 -0700
Re: Trying to utilize mailx to send mail via apython script Ferrous Cranus <nikos@superhost.gr> - 2013-09-06 11:09 +0300
Re: Trying to utilize mailx to send mail via apython script Todd <Todd@invalid.invalid> - 2013-09-07 15:39 -0700
Re: Trying to utilize mailx to send mail via apython script Todd <Todd@invalid.invalid> - 2013-09-07 15:41 -0700
Re: Trying to utilize mailx to send mail via apython script Todd <Todd@invalid.invalid> - 2013-09-07 16:20 -0700
Re: Trying to utilize mailx to send mail via apython script Ferrous Cranus <nikos@superhost.gr> - 2013-09-08 09:54 +0300
Re: Trying to utilize mailx to send mail via apython script Todd <Todd@invalid.invalid> - 2013-09-08 13:15 -0700
Re: Trying to utilize mailx to send mail via apython script Ferrous Cranus <nikos@superhost.gr> - 2013-09-09 11:29 +0300
Re: Trying to utilize mailx to send mail via apython script Todd <Todd@invalid.invalid> - 2013-09-09 11:44 -0700
Re: Trying to utilize mailx to send mail via apython script Whiskers <catwheezel@operamail.com> - 2013-09-09 22:07 +0100
Re: Trying to utilize mailx to send mail via apython script "Jonathan N. Little" <lws4art@gmail.com> - 2013-09-09 17:33 -0400
Re: Trying to utilize mailx to send mail via apython script Whiskers <catwheezel@operamail.com> - 2013-09-10 16:38 +0100
Re: Trying to utilize mailx to send mail via apython script Ferrous Cranus <nikos@superhost.gr> - 2013-09-10 22:37 +0300
Re: Trying to utilize mailx to send mail via apython script David Brown <david.brown@removethis.hesbynett.no> - 2013-09-10 23:04 +0200
Re: Trying to utilize mailx to send mail via apython script Whiskers <catwheezel@operamail.com> - 2013-09-10 22:05 +0100
Re: Trying to utilize mailx to send mail via apython script David Brown <david@westcontrol.removethisbit.com> - 2013-09-06 11:10 +0200
Re: Trying to utilize mailx to send mail via apython script Ferrous Cranus <nikos@superhost.gr> - 2013-09-06 12:17 +0300
Re: Trying to utilize mailx to send mail via apython script David Brown <david.brown@removethis.hesbynett.no> - 2013-09-08 16:34 +0200
Re: Trying to utilize mailx to send mail via apython script Ferrous Cranus <nikos@superhost.gr> - 2013-09-08 18:37 +0300
Re: Trying to utilize mailx to send mail via apython script David Brown <david.brown@removethis.hesbynett.no> - 2013-09-09 01:57 +0200
Page 1 of 3 [1] 2 3 Next page →
| From | Ferrous Cranus <nikos@superhost.gr> |
|---|---|
| Date | 2013-09-05 19:11 +0300 |
| Subject | Trying to utilize mailx to send mail via apython script |
| Message-ID | <l0aaf9$2fe$1@dont-email.me> |
i as root just installed
sendmail and mailx. i have edited the ~/.mailrc to use:
nikos@superhost.gr [~/www/cgi-bin]# cat ~/.mailrc
account gmail {
set smtp-use-starttls
set smtp=smtp://smtp.gmail.com:587
set smtp-auth=login
set smtp-auth-user=may)gmail
set smtp-auth-password=my_gmail_pass_not_stupid_enough_to_wite _it_again
}e
And now i'm trying to:
cmd = "echo %s | mailx -A gmail -r %s -s %s %s" % (MESSAGE, FROM,
SUBJECT, TO)
p=subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE )
output, errors = p.communicate()
print( errors, output )
Any ideas please why this fails to work?
while i remove the '-A gmail' string in the cmd line then i can send
fast mail but only to mail containing the @superhost.gr trail.
i need to be eble to send to external mails to.
[toc] | [next] | [standalone]
| From | Jorgen Grahn <grahn+nntp@snipabacken.se> |
|---|---|
| Date | 2013-09-05 18:13 +0000 |
| Message-ID | <slrnl2hies.2m9.grahn+nntp@frailea.sa.invalid> |
| In reply to | #2248 |
On Thu, 2013-09-05, Ferrous Cranus wrote:
>
>
> i as root just installed
>
> sendmail and mailx. i have edited the ~/.mailrc to use:
>
>
> nikos@superhost.gr [~/www/cgi-bin]# cat ~/.mailrc
> account gmail {
> set smtp-use-starttls
> set smtp=smtp://smtp.gmail.com:587
> set smtp-auth=login
> set smtp-auth-user=may)gmail
> set smtp-auth-password=my_gmail_pass_not_stupid_enough_to_wite _it_again
> }e
Where did you learn about this .mailrc syntax? It doesn't match the
one documented in mailx(1) on my machines. (That's BSD mailx; there
seems to be two different flavors, but I don't think they are /that/
radically different.)
There are two ways to send mail on Unix:
1 Enqueue it to the local MTA using /usr/lib/sendmail. The local MTA
then becomes responsible for passing it on, if needed. This is the
traditional approach used by at, cron, mail, mailx, mutt ...
2 Send it via SMTP to some external mail relay. Local mail won't
work, every mail client must be configured, and temporary delivery
problems will be fatal.
You seem to have the software for (1), but the configuration for (2).
...
> cmd = "echo %s | mailx -A gmail -r %s -s %s %s" % (MESSAGE, FROM,
> SUBJECT, TO)
> p=subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE )
...
Make it work from the command line before attempting to automate it.
(You may also want to avoid invoking the shell. Think about what
might happen if MESSAGE=="; rm -rf $HOME ;".)
/Jorgen
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
[toc] | [prev] | [next] | [standalone]
| From | Ferrous Cranus <nikos@superhost.gr> |
|---|---|
| Date | 2013-09-06 09:19 +0300 |
| Message-ID | <l0bs5m$jg8$1@dont-email.me> |
| In reply to | #2249 |
Στις 5/9/2013 9:13 μμ, ο/η Jorgen Grahn έγραψε: >> cmd = "echo %s | mailx -A gmail -r %s -s %s %s" % (MESSAGE, FROM, >> SUBJECT, TO) >> p=subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE ) > ... > > Make it work from the command line before attempting to automate it. > > (You may also want to avoid invoking the shell. Think about what > might happen if MESSAGE=="; rm -rf $HOME ;".) Hello, Even so, even trying it from the shell that is, 'mailx' fails to delivers my test mails. Can one helo me congigure sendmail properly? mailX == an MUA == a Mail Client right? sendmail == MTA == program that is responsilble to send mails? So, i gather 'mailx' does use 'sendmail' to send mail yes? can you provide me a working mail exmaple that works? Why i can only send mail to local server addresses an not to an external mail address? -- Webhost <http://superhost.gr>
[toc] | [prev] | [next] | [standalone]
| From | Jorgen Grahn <grahn+nntp@snipabacken.se> |
|---|---|
| Date | 2013-09-06 08:50 +0000 |
| Message-ID | <slrnl2j5rd.2m9.grahn+nntp@frailea.sa.invalid> |
| In reply to | #2250 |
On Fri, 2013-09-06, Ferrous Cranus wrote:
> ???????? 5/9/2013 9:13 ????, ??/?? Jorgen Grahn ????????????:
>>> cmd = "echo %s | mailx -A gmail -r %s -s %s %s" % (MESSAGE, FROM,
>>> SUBJECT, TO)
>>> p=subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE )
>> ...
>>
>> Make it work from the command line before attempting to automate it.
>>
>> (You may also want to avoid invoking the shell. Think about what
>> might happen if MESSAGE=="; rm -rf $HOME ;".)
>
>
> Hello,
>
> Even so, even trying it from the shell that is, 'mailx' fails to
> delivers my test mails.
Yes, that's exactly my point. It's a general problem solving trick:
if you can split your problem in two parts, try to solve one at a
time.
> Can one helo me congigure sendmail properly?
>
>
> mailX == an MUA == a Mail Client right?
> sendmail == MTA == program that is responsilble to send mails?
>
> So, i gather 'mailx' does use 'sendmail' to send mail yes?
Yes, the version of mailx I am used to[1] does that ... but apparently
you and the other posters are using some /other/ tool with the same
name.
> can you provide me a working mail exmaple that works?
Sorry; no. I use neither sendmail nor gmail.
> Why i can only send mail to local server addresses an not to an external
> mail address?
Don't know, but remember that local mail is a lot easier. As long as
you have an MTA (e.g. sendmail) running and its config is not horribly
broken, local->local will work.
/Jorgen
[1] Mailx is /old/. I used it on SunOS 20 years ago, and it wasn't
new then.
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
[toc] | [prev] | [next] | [standalone]
| From | Ferrous Cranus <nikos@superhost.gr> |
|---|---|
| Date | 2013-09-06 12:06 +0300 |
| Message-ID | <l0c5tp$sh$1@dont-email.me> |
| In reply to | #2253 |
Στις 6/9/2013 11:50 πμ, ο/η Jorgen Grahn έγραψε: >> Why i can only send mail to local server addresses an not to an external >> mail address? > Don't know, but remember that local mail is a lot easier. As long as > you have an MTA (e.g. sendmail) running and its config is not horribly > broken, local->local will work. I have managed already to make it work local=>local But then how about local => internet what configurations should i do? try to run what condig? Is there an alternative that will help me send mails more easily? -- Webhost <http://superhost.gr>
[toc] | [prev] | [next] | [standalone]
| From | "Jonathan N. Little" <lws4art@gmail.com> |
|---|---|
| Date | 2013-09-06 14:10 -0400 |
| Message-ID | <l0d5qs$jlk$1@dont-email.me> |
| In reply to | #2254 |
Ferrous Cranus wrote: > Στις 6/9/2013 11:50 πμ, ο/η Jorgen Grahn έγραψε: >>> Why i can only send mail to local server addresses an not to an external >>> mail address? >> Don't know, but remember that local mail is a lot easier. As long as >> you have an MTA (e.g. sendmail) running and its config is not horribly >> broken, local->local will work. > > > I have managed already to make it work local=>local > > But then how about local => internet If you are only going it that direction "local => internet" and "internet" is gmail a simple solution is sSMTP. https://wiki.debian.org/sSMTP https://wiki.archlinux.org/index.php/SSMTP I use it for remote servers to send error messages and info via scripts to an "admin" gmail account. Very simple to setup and works with gmail. Works for me to keep tabs on various servers I maintain. -- Take care, Jonathan ------------------- LITTLE WORKS STUDIO http://www.LittleWorksStudio.com
[toc] | [prev] | [next] | [standalone]
| From | Ferrous Cranus <nikos@superhost.gr> |
|---|---|
| Date | 2013-09-07 08:33 +0300 |
| Message-ID | <l0edrv$l50$1@dont-email.me> |
| In reply to | #2257 |
Στις 6/9/2013 9:10 μμ, ο/η Jonathan N. Little έγραψε: > Ferrous Cranus wrote: >> Στις 6/9/2013 11:50 πμ, ο/η Jorgen Grahn έγραψε: >>>> Why i can only send mail to local server addresses an not to an >>>> external >>>> mail address? >>> Don't know, but remember that local mail is a lot easier. As long as >>> you have an MTA (e.g. sendmail) running and its config is not horribly >>> broken, local->local will work. >> >> >> I have managed already to make it work local=>local >> >> But then how about local => internet > > If you are only going it that direction "local => internet" and > "internet" is gmail a simple solution is sSMTP. > > https://wiki.debian.org/sSMTP > https://wiki.archlinux.org/index.php/SSMTP > > I use it for remote servers to send error messages and info via scripts > to an "admin" gmail account. > > Very simple to setup and works with gmail. Works for me to keep tabs on > various servers I maintain. > > Can i use my own FROM field with sSMTP? But connecting to google's smtp server will still add a Sender header. -- Webhost <http://superhost.gr>
[toc] | [prev] | [next] | [standalone]
| From | "Jonathan N. Little" <lws4art@gmail.com> |
|---|---|
| Date | 2013-09-07 08:33 -0400 |
| Message-ID | <l0f6eo$47f$1@dont-email.me> |
| In reply to | #2258 |
Ferrous Cranus wrote: > Στις 6/9/2013 9:10 μμ, ο/η Jonathan N. Little έγραψε: >> Ferrous Cranus wrote: >>> Στις 6/9/2013 11:50 πμ, ο/η Jorgen Grahn έγραψε: >>>>> Why i can only send mail to local server addresses an not to an >>>>> external >>>>> mail address? >>>> Don't know, but remember that local mail is a lot easier. As long as >>>> you have an MTA (e.g. sendmail) running and its config is not horribly >>>> broken, local->local will work. >>> >>> >>> I have managed already to make it work local=>local >>> >>> But then how about local => internet >> >> If you are only going it that direction "local => internet" and >> "internet" is gmail a simple solution is sSMTP. >> >> https://wiki.debian.org/sSMTP >> https://wiki.archlinux.org/index.php/SSMTP >> >> I use it for remote servers to send error messages and info via scripts >> to an "admin" gmail account. >> >> Very simple to setup and works with gmail. Works for me to keep tabs on >> various servers I maintain. >> >> > Can i use my own FROM field with sSMTP? Yes. I even add "X-*" headers for sorting done within my scripts, Perl and shell scripts so would be no problem with Python. > But connecting to google's smtp server will still add a Sender header. Not for the from From field, but the hostname is recorded in Received field...but maybe I am misunderstanding your question. -- Take care, Jonathan ------------------- LITTLE WORKS STUDIO http://www.LittleWorksStudio.com
[toc] | [prev] | [next] | [standalone]
| From | Ferrous Cranus <nikos@superhost.gr> |
|---|---|
| Date | 2013-09-07 23:24 +0300 |
| Message-ID | <l0g21u$1pp$1@dont-email.me> |
| In reply to | #2259 |
Στις 7/9/2013 3:33 μμ, ο/η Jonathan N. Little έγραψε: > Ferrous Cranus wrote: >> Στις 6/9/2013 9:10 μμ, ο/η Jonathan N. Little έγραψε: >>> Ferrous Cranus wrote: >>>> Στις 6/9/2013 11:50 πμ, ο/η Jorgen Grahn έγραψε: >>>>>> Why i can only send mail to local server addresses an not to an >>>>>> external >>>>>> mail address? >>>>> Don't know, but remember that local mail is a lot easier. As long as >>>>> you have an MTA (e.g. sendmail) running and its config is not horribly >>>>> broken, local->local will work. >>>> >>>> >>>> I have managed already to make it work local=>local >>>> >>>> But then how about local => internet >>> >>> If you are only going it that direction "local => internet" and >>> "internet" is gmail a simple solution is sSMTP. >>> >>> https://wiki.debian.org/sSMTP >>> https://wiki.archlinux.org/index.php/SSMTP >>> >>> I use it for remote servers to send error messages and info via scripts >>> to an "admin" gmail account. >>> >>> Very simple to setup and works with gmail. Works for me to keep tabs on >>> various servers I maintain. >>> >>> >> Can i use my own FROM field with sSMTP? > > > Yes. I even add "X-*" headers for sorting done within my scripts, Perl > and shell scripts so would be no problem with Python. > >> But connecting to google's smtp server will still add a Sender header. > > > Not for the from From field, but the hostname is recorded in Received > field...but maybe I am misunderstanding your question. > is there a way to send mail from the mail address i specify and without the hostname of my server being revealed? -- Webhost <http://superhost.gr>
[toc] | [prev] | [next] | [standalone]
| From | "Jonathan N. Little" <lws4art@gmail.com> |
|---|---|
| Date | 2013-09-07 16:54 -0400 |
| Message-ID | <l0g3pu$cc0$1@dont-email.me> |
| In reply to | #2261 |
Ferrous Cranus wrote: > Στις 7/9/2013 3:33 μμ, ο/η Jonathan N. Little έγραψε: >> Ferrous Cranus wrote: >>> Στις 6/9/2013 9:10 μμ, ο/η Jonathan N. Little έγραψε: >>>> Ferrous Cranus wrote: >>>>> Στις 6/9/2013 11:50 πμ, ο/η Jorgen Grahn έγραψε: >>>>>>> Why i can only send mail to local server addresses an not to an >>>>>>> external >>>>>>> mail address? >>>>>> Don't know, but remember that local mail is a lot easier. As long as >>>>>> you have an MTA (e.g. sendmail) running and its config is not >>>>>> horribly >>>>>> broken, local->local will work. >>>>> >>>>> >>>>> I have managed already to make it work local=>local >>>>> >>>>> But then how about local => internet >>>> >>>> If you are only going it that direction "local => internet" and >>>> "internet" is gmail a simple solution is sSMTP. >>>> >>>> https://wiki.debian.org/sSMTP >>>> https://wiki.archlinux.org/index.php/SSMTP >>>> >>>> I use it for remote servers to send error messages and info via scripts >>>> to an "admin" gmail account. >>>> >>>> Very simple to setup and works with gmail. Works for me to keep tabs on >>>> various servers I maintain. >>>> >>>> >>> Can i use my own FROM field with sSMTP? >> >> >> Yes. I even add "X-*" headers for sorting done within my scripts, Perl >> and shell scripts so would be no problem with Python. >> >>> But connecting to google's smtp server will still add a Sender header. >> >> >> Not for the from From field, but the hostname is recorded in Received >> field...but maybe I am misunderstanding your question. >> > is there a way to send mail from the mail address i specify and without > the hostname of my server being revealed? > Well reading the man it says <http://linux.die.net/man/5/ssmtp.conf> it says: "Hostname The full qualified name of the host. If not specified, the host is queried for its hostname. " So to test I used "bogus.nowhere.invalid" and that is what is in the header for "Received:" fields. This is independent of the "From:" field which you can set with your script if your enable it in the ssmtp.conf. But note your external IP will be recorded though, no way around that I would guess without a proxy. -- Take care, Jonathan ------------------- LITTLE WORKS STUDIO http://www.LittleWorksStudio.com
[toc] | [prev] | [next] | [standalone]
| From | Ferrous Cranus <nikos@superhost.gr> |
|---|---|
| Date | 2013-09-08 09:58 +0300 |
| Message-ID | <l0h763$4i1$1@dont-email.me> |
| In reply to | #2262 |
Στις 7/9/2013 11:54 μμ, ο/η Jonathan N. Little έγραψε: > Ferrous Cranus wrote: >> Στις 7/9/2013 3:33 μμ, ο/η Jonathan N. Little έγραψε: >>> Ferrous Cranus wrote: >>>> Στις 6/9/2013 9:10 μμ, ο/η Jonathan N. Little έγραψε: >>>>> Ferrous Cranus wrote: >>>>>> Στις 6/9/2013 11:50 πμ, ο/η Jorgen Grahn έγραψε: >>>>>>>> Why i can only send mail to local server addresses an not to an >>>>>>>> external >>>>>>>> mail address? >>>>>>> Don't know, but remember that local mail is a lot easier. As >>>>>>> long as >>>>>>> you have an MTA (e.g. sendmail) running and its config is not >>>>>>> horribly >>>>>>> broken, local->local will work. >>>>>> >>>>>> >>>>>> I have managed already to make it work local=>local >>>>>> >>>>>> But then how about local => internet >>>>> >>>>> If you are only going it that direction "local => internet" and >>>>> "internet" is gmail a simple solution is sSMTP. >>>>> >>>>> https://wiki.debian.org/sSMTP >>>>> https://wiki.archlinux.org/index.php/SSMTP >>>>> >>>>> I use it for remote servers to send error messages and info via >>>>> scripts >>>>> to an "admin" gmail account. >>>>> >>>>> Very simple to setup and works with gmail. Works for me to keep >>>>> tabs on >>>>> various servers I maintain. >>>>> >>>>> >>>> Can i use my own FROM field with sSMTP? >>> >>> >>> Yes. I even add "X-*" headers for sorting done within my scripts, Perl >>> and shell scripts so would be no problem with Python. >>> >>>> But connecting to google's smtp server will still add a Sender header. >>> >>> >>> Not for the from From field, but the hostname is recorded in Received >>> field...but maybe I am misunderstanding your question. >>> >> is there a way to send mail from the mail address i specify and without >> the hostname of my server being revealed? >> > > Well reading the man it says <http://linux.die.net/man/5/ssmtp.conf> > it says: > > "Hostname > The full qualified name of the host. If not specified, the host is > queried for its hostname. " > > So to test I used "bogus.nowhere.invalid" and that is what is in the > header for "Received:" fields. This is independent of the "From:" field > which you can set with your script if your enable it in the ssmtp.conf. > But note your external IP will be recorded though, no way around that I > would guess without a proxy. > > I want to avoid using GMail's service because it adds up a Sender: header saying that the mail originating from my gmail accoutn while i want to use the FROM field that the visitor used in my html web form to fill in his email Also it would be nice if the hostname would appear too. Pehars by using a proxy. Can ssmtp handle this? I cannot even download ssmtp when i 'yum install ssmtp' where can i find it as a package and can you please provide me a ssmtp.conf file that does the above( set its own FROM field and alter hostname) Thank you. -- Webhost <http://superhost.gr>
[toc] | [prev] | [next] | [standalone]
| From | Ferrous Cranus <nikos@superhost.gr> |
|---|---|
| Date | 2013-09-08 10:57 +0300 |
| Message-ID | <l0halk$ip5$1@dont-email.me> |
| In reply to | #2267 |
Στις 8/9/2013 9:58 πμ, ο/η Ferrous Cranus έγραψε: > Στις 7/9/2013 11:54 μμ, ο/η Jonathan N. Little έγραψε: >> Ferrous Cranus wrote: >>> Στις 7/9/2013 3:33 μμ, ο/η Jonathan N. Little έγραψε: >>>> Ferrous Cranus wrote: >>>>> Στις 6/9/2013 9:10 μμ, ο/η Jonathan N. Little έγραψε: >>>>>> Ferrous Cranus wrote: >>>>>>> Στις 6/9/2013 11:50 πμ, ο/η Jorgen Grahn έγραψε: >>>>>>>>> Why i can only send mail to local server addresses an not to an >>>>>>>>> external >>>>>>>>> mail address? >>>>>>>> Don't know, but remember that local mail is a lot easier. As >>>>>>>> long as >>>>>>>> you have an MTA (e.g. sendmail) running and its config is not >>>>>>>> horribly >>>>>>>> broken, local->local will work. >>>>>>> >>>>>>> >>>>>>> I have managed already to make it work local=>local >>>>>>> >>>>>>> But then how about local => internet >>>>>> >>>>>> If you are only going it that direction "local => internet" and >>>>>> "internet" is gmail a simple solution is sSMTP. >>>>>> >>>>>> https://wiki.debian.org/sSMTP >>>>>> https://wiki.archlinux.org/index.php/SSMTP >>>>>> >>>>>> I use it for remote servers to send error messages and info via >>>>>> scripts >>>>>> to an "admin" gmail account. >>>>>> >>>>>> Very simple to setup and works with gmail. Works for me to keep >>>>>> tabs on >>>>>> various servers I maintain. >>>>>> >>>>>> >>>>> Can i use my own FROM field with sSMTP? >>>> >>>> >>>> Yes. I even add "X-*" headers for sorting done within my scripts, Perl >>>> and shell scripts so would be no problem with Python. >>>> >>>>> But connecting to google's smtp server will still add a Sender header. >>>> >>>> >>>> Not for the from From field, but the hostname is recorded in Received >>>> field...but maybe I am misunderstanding your question. >>>> >>> is there a way to send mail from the mail address i specify and without >>> the hostname of my server being revealed? >>> >> >> Well reading the man it says <http://linux.die.net/man/5/ssmtp.conf> >> it says: >> >> "Hostname >> The full qualified name of the host. If not specified, the host is >> queried for its hostname. " >> >> So to test I used "bogus.nowhere.invalid" and that is what is in the >> header for "Received:" fields. This is independent of the "From:" field >> which you can set with your script if your enable it in the ssmtp.conf. >> But note your external IP will be recorded though, no way around that I >> would guess without a proxy. >> >> > I want to avoid using GMail's service because it adds up a Sender: > header saying that the mail originating from my gmail accoutn while i > want to use the FROM field that the visitor used in my html web form to > fill in his email > > Also it would be nice if the hostname would appear too. Pehars by using > a proxy. > Can ssmtp handle this? > > I cannot even download ssmtp when i 'yum install ssmtp' > > where can i find it as a package and can you please provide me a > ssmtp.conf file that does the above( set its own FROM field and alter > hostname) > > Thank you. > I cannot evn decide if i need an external mail server or setup my own mail server. -- Webhost <http://superhost.gr>
[toc] | [prev] | [next] | [standalone]
| From | "Jonathan N. Little" <lws4art@gmail.com> |
|---|---|
| Date | 2013-09-08 10:11 -0400 |
| Message-ID | <l0i0hj$s7b$1@dont-email.me> |
| In reply to | #2267 |
Ferrous Cranus wrote: > Στις 7/9/2013 11:54 μμ, ο/η Jonathan N. Little έγραψε: >> Ferrous Cranus wrote: >>> Στις 7/9/2013 3:33 μμ, ο/η Jonathan N. Little έγραψε: >>>> Ferrous Cranus wrote: >>>>> Στις 6/9/2013 9:10 μμ, ο/η Jonathan N. Little έγραψε: >>>>>> Ferrous Cranus wrote: >>>>>>> Στις 6/9/2013 11:50 πμ, ο/η Jorgen Grahn έγραψε: >>>>>>>>> Why i can only send mail to local server addresses an not to an >>>>>>>>> external >>>>>>>>> mail address? >>>>>>>> Don't know, but remember that local mail is a lot easier. As >>>>>>>> long as >>>>>>>> you have an MTA (e.g. sendmail) running and its config is not >>>>>>>> horribly >>>>>>>> broken, local->local will work. >>>>>>> >>>>>>> >>>>>>> I have managed already to make it work local=>local >>>>>>> >>>>>>> But then how about local => internet >>>>>> >>>>>> If you are only going it that direction "local => internet" and >>>>>> "internet" is gmail a simple solution is sSMTP. >>>>>> >>>>>> https://wiki.debian.org/sSMTP >>>>>> https://wiki.archlinux.org/index.php/SSMTP >>>>>> >>>>>> I use it for remote servers to send error messages and info via >>>>>> scripts >>>>>> to an "admin" gmail account. >>>>>> >>>>>> Very simple to setup and works with gmail. Works for me to keep >>>>>> tabs on >>>>>> various servers I maintain. >>>>>> >>>>>> >>>>> Can i use my own FROM field with sSMTP? >>>> >>>> >>>> Yes. I even add "X-*" headers for sorting done within my scripts, Perl >>>> and shell scripts so would be no problem with Python. >>>> >>>>> But connecting to google's smtp server will still add a Sender header. >>>> >>>> >>>> Not for the from From field, but the hostname is recorded in Received >>>> field...but maybe I am misunderstanding your question. >>>> >>> is there a way to send mail from the mail address i specify and without >>> the hostname of my server being revealed? >>> >> >> Well reading the man it says <http://linux.die.net/man/5/ssmtp.conf> >> it says: >> >> "Hostname >> The full qualified name of the host. If not specified, the host is >> queried for its hostname. " >> >> So to test I used "bogus.nowhere.invalid" and that is what is in the >> header for "Received:" fields. This is independent of the "From:" field >> which you can set with your script if your enable it in the ssmtp.conf. >> But note your external IP will be recorded though, no way around that I >> would guess without a proxy. >> >> > I want to avoid using GMail's service because it adds up a Sender: > header saying that the mail originating from my gmail accoutn while i > want to use the FROM field that the visitor used in my html web form to > fill in his email > > Also it would be nice if the hostname would appear too. Pehars by using > a proxy. > Can ssmtp handle this? > > I cannot even download ssmtp when i 'yum install ssmtp' What distro are you using? Ubuntu/Debian has it in the standard repos and one of the links on configuration was for Arch > where can i find it as a package and can you please provide me a > ssmtp.conf file that does the above( set its own FROM field and alter > hostname) > The ssmtp.conf should be in /etc/ssmtp/ssmtp.conf if you installed the package. -- Take care, Jonathan ------------------- LITTLE WORKS STUDIO http://www.LittleWorksStudio.com
[toc] | [prev] | [next] | [standalone]
| From | Ferrous Cranus <nikos@superhost.gr> |
|---|---|
| Date | 2013-09-08 17:16 +0300 |
| Message-ID | <l0i0sl$tsc$1@dont-email.me> |
| In reply to | #2269 |
Στις 8/9/2013 5:11 μμ, ο/η Jonathan N. Little έγραψε: >> I want to avoid using GMail's service because it adds up a Sender: >> header saying that the mail originating from my gmail accoutn while i >> want to use the FROM field that the visitor used in my html web form to >> fill in his email >> >> Also it would be nice if the hostname would appear too. Pehars by using >> a proxy. >> Can ssmtp handle this? >> >> I cannot even download ssmtp when i 'yum install ssmtp' > > What distro are you using? Ubuntu/Debian has it in the standard repos > and one of the links on configuration was for Arch > >> where can i find it as a package and can you please provide me a >> ssmtp.conf file that does the above( set its own FROM field and alter >> hostname) >> > > The ssmtp.conf should be in /etc/ssmtp/ssmtp.conf if you installed the > package. i use CentOS 6.4 and yum install ssmtp cannot detect it. Please if you comment in for my other questions too. -- Webhost <http://superhost.gr>
[toc] | [prev] | [next] | [standalone]
| From | Todd <Todd@invalid.invalid> |
|---|---|
| Date | 2013-09-08 18:23 -0700 |
| Message-ID | <l0j7vg$npm$1@dont-email.me> |
| In reply to | #2270 |
On 09/08/2013 07:16 AM, Ferrous Cranus wrote: > > > i use CentOS 6.4 and yum install ssmtp cannot detect it. > > Please if you comment in for my other questions too. $ cat /etc/redhat-release Scientific Linux release 6.4 (Carbon) $ yum --enablerepo=* whatprovides ssmtpssmtp-2.61-19.el6.x86_64 : Extremely simple MTA to get mail off the system to a Mailhub Repo : epel ... -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ the riddle wrapped in an enigma wrapped in a couple slices of baloney ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[toc] | [prev] | [next] | [standalone]
| From | Todd <Todd@invalid.invalid> |
|---|---|
| Date | 2013-09-08 18:35 -0700 |
| Message-ID | <l0j8lp$qei$1@dont-email.me> |
| In reply to | #2278 |
On 09/08/2013 06:23 PM, Todd wrote: > On 09/08/2013 07:16 AM, Ferrous Cranus wrote: >> >> >> i use CentOS 6.4 and yum install ssmtp cannot detect it. >> >> Please if you comment in for my other questions too. > > > $ cat /etc/redhat-release > Scientific Linux release 6.4 (Carbon) > > $ yum --enablerepo=* whatprovides ssmtpssmtp-2.61-19.el6.x86_64 : > Extremely simple MTA to get mail off the system to a Mailhub > Repo : epel You can download this from pbone.net, if you don't want to get install EPEL repo. Also, I never got ssmtp to work with gmail. -T -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ the riddle wrapped in an enigma wrapped in a couple slices of baloney ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[toc] | [prev] | [next] | [standalone]
| From | "Jonathan N. Little" <lws4art@gmail.com> |
|---|---|
| Date | 2013-09-09 17:11 -0400 |
| Message-ID | <l0ldh6$r59$1@dont-email.me> |
| In reply to | #2279 |
Todd wrote: > On 09/08/2013 06:23 PM, Todd wrote: >> On 09/08/2013 07:16 AM, Ferrous Cranus wrote: >>> >>> >>> i use CentOS 6.4 and yum install ssmtp cannot detect it. >>> >>> Please if you comment in for my other questions too. >> >> >> $ cat /etc/redhat-release >> Scientific Linux release 6.4 (Carbon) >> >> $ yum --enablerepo=* whatprovides ssmtpssmtp-2.61-19.el6.x86_64 : >> Extremely simple MTA to get mail off the system to a Mailhub >> Repo : epel > > > You can download this from pbone.net, if you don't want to > get install EPEL repo. > > Also, I never got ssmtp to work with gmail. Really? I usually use nullmailer but it does not work with gmail. ssmtp was the only thing that I got to work with gmail on several computers. Generally what I do to assist in remote administration for servers. I create a gmail account for error messages and notices, use ssmtp to setup a lightweight smtp "server" My scripts email warnings, errors, and messages to that account and the server admins only have to monitor that email account from anywhere... -- Take care, Jonathan ------------------- LITTLE WORKS STUDIO http://www.LittleWorksStudio.com
[toc] | [prev] | [next] | [standalone]
| From | Todd <Todd@invalid.invalid> |
|---|---|
| Date | 2013-09-09 14:40 -0700 |
| Message-ID | <l0lf92$44m$1@dont-email.me> |
| In reply to | #2287 |
On 09/09/2013 02:11 PM, Jonathan N. Little wrote: >> Also, I never got ssmtp to work with gmail. > Really? I usually use nullmailer but it does not work with gmail. It took me several days to figure out how to get mailx to work with gmail and zmail. I was pretty frazzled by the end of it. Probably contributed with me not getting ssmtp working -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ the riddle wrapped in an enigma wrapped in a couple slices of baloney ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[toc] | [prev] | [next] | [standalone]
| From | "Jonathan N. Little" <lws4art@gmail.com> |
|---|---|
| Date | 2013-09-09 18:15 -0400 |
| Message-ID | <l0lhah$jkd$1@dont-email.me> |
| In reply to | #2289 |
Todd wrote: > On 09/09/2013 02:11 PM, Jonathan N. Little wrote: >>> Also, I never got ssmtp to work with gmail. > >> Really? I usually use nullmailer but it does not work with gmail. > > It took me several days to figure out how to get mailx to > work with gmail and zmail. I was pretty frazzled by > the end of it. Probably contributed with me not getting > ssmtp working > Other than installing it edit the /etc/ssmtp/ssmtp.conf to something like this change what is obvious: # /etc/ssmtp/ssmtp.conf # Sample Config file for sSMTP sendmail # # The person who gets all mail for userids < 1000 root=YOUR_EMAIL@gmail.com UseTLS=YES UseSTARTTLS=YES mailhub=smtp.gmail.com:587 # Are users allowed to set their own From: address? # YES - Allow the user to specify their own From: address # NO - Use the system generated From: address FromLineOverride=YES # # Username and password for Google's Gmail servers # From addresses are settled by Mutt's rc file, so # with this setup one can still achieve multi-user SMTP AuthUser=YOUR_EMAIL@gmail.com AuthPass=YOUR_GMAIL_PASSWORD Then you might like to setup alias like as follows: #/etc/ssmtp/revaliases # sSMTP aliases # # Format: local_account:outgoing_address:mailhub # # Some common handy examples to redirect system script messages root:YOUR_EMAIL@gmail.com postmaster:YOUR_EMAIL@gmail.com And you can test it out with the bash one-liner echo -e "TO: Admin <YOUR_EMAIL@gmail.com>\nFROM: test <bogus@invalid>\nSUBJECT: A Test\nA sample message" | $(which sendmail) YOUR_EMAIL@gmail.com -- Take care, Jonathan ------------------- LITTLE WORKS STUDIO http://www.LittleWorksStudio.com
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@removethis.hesbynett.no> |
|---|---|
| Date | 2013-09-08 16:42 +0200 |
| Message-ID | <bp-dnQdFuIB-EbHPnZ2dnUVZ8u2dnZ2d@lyse.net> |
| In reply to | #2267 |
On 08/09/13 08:58, Ferrous Cranus wrote: > I want to avoid using GMail's service because it adds up a Sender: > header saying that the mail originating from my gmail accoutn while i > want to use the FROM field that the visitor used in my html web form to > fill in his email > If I understand you correctly here, you want a visitor to be able to put a "To" address and a "From" address, and you want to pass on the mail with those addresses and no others. Let me know if you get it working - I'll sell the website's address to spammers for a substantial fee. Put another way, do /not/ do this. If you are sending email, then /you/ are sending it. If /your/ server is sending email, then the "from" and "sender" addresses should be /your/ server or related email addresses. It is basically fraud to say that someone else sent the email, even if that someone had filled in the web form for the email. > Also it would be nice if the hostname would appear too. Pehars by using > a proxy. > Can ssmtp handle this? > Most SMTP clients - ssmtp, Python's SMTP module, or anything else other than a standard email program (which tend to be a bit limited) can put anything you want in any field.
[toc] | [prev] | [next] | [standalone]
Page 1 of 3 [1] 2 3 Next page →
Back to top | Article view | comp.os.linux.networking
csiph-web