Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ssmtp: login to send mail
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
DumbAss
Apprentice
Apprentice


Joined: 30 Sep 2003
Posts: 247
Location: 't Steen

PostPosted: Wed Jul 07, 2004 8:34 am    Post subject: ssmtp: login to send mail Reply with quote

Hi!

Ok, the goal I want to achieve is to send mail via the command line with the command "mail".

I've edited /etc/ssmtp/ssmtp.conf so it matched my exchange server. The only problem is that I have to login in the exchange server to send mail.

With the command:
Code:

ssmtp -au user -ap password -am CRAM-MD5 someone@google.com

I can send mail with this command but I want to be able to send mail with the command "mail".

How can I achieve this?
Back to top
View user's profile Send private message
punzeroni
n00b
n00b


Joined: 28 Jul 2003
Posts: 14
Location: Ulm, Germany

PostPosted: Wed Jul 07, 2004 1:45 pm    Post subject: Reply with quote

Hi DumbAss!
(what a wonderful nickname you chose! )

My suggestion would be to create a link to the binary of ssmtp (i reckon it should be /usr/sbin/ssmtp).

Code:

ln -s /usr/sbin/ssmtp /usr/sbin/mail


In case you also want to get rid of the "lengthy" command you could go take another approach -> shell script
in /usr/sbin create a file called mail.sh which contains the following lines:
Code:

#!/bin/sh
ssmtp -au user -ap password -am CRAM-MD5 $1


then you create a link to it:
Code:

ln -s /usr/sbin/mail.sh /usr/sbin/mail


and if I think correctly you're now able to send mails with
Code:

mail dumbass@nickname.nl


Hope that helped
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum