LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   sendmail, fetchmail, procmail, permissions, etc (https://www.linuxquestions.org/questions/linux-software-2/sendmail-fetchmail-procmail-permissions-etc-493653/)

xeon123 10-18-2006 06:08 PM

sendmail, fetchmail, procmail, permissions, etc
 
Hi,

i've a bunch of questions that i would like to pose.

I would like to send mail in the bash, through the command "mail", using sendmail. But i don't understand quite the goal of sendmail.

1 - How i configure the SMTP server (mail.telepac.pt) in sendmail? The specified smtp address belongs to a service provider, and not belongs to my network. Do i need also a SMTP server installed in my network to redirect the mail messages to the SMTP server from the service provider?

2 - The sendmail can also receive mail, or this feature belongs to only to fetchmail?

3 - sendmail can also send mail to hosts from my network?

4 - What's the advantage of using sendmail, procmail and fetchmail, instead of Thunderbird?

5 - In this example for procmail, it says:

"
PATH=/usr/bin:/bin:/usr/local/bin:
MAILDIR=$HOME/Mail
DEFAULT=$MAILDIR/mbox
LOGFILE=$MAILDIR/log

The variable DEFAULT specified a defaul mail box, where all the messages goes to."

5.1 - This means that all the mails that i receive will be appended to the file Mail. Ie, i've a file that contains all the mails? This makes sense?

6 - Is there any text mode messenger?

7 - What can i do to simple users have the permission to use the command shutdown and reboot?

8 - I've and external HD (hard-drive) that sometimes it's turned off when i start linux OS, or i turned on when i'm working in the computer. How can i configure the external hd to be auto mounted in the situations described above?

Thanks,
Pedro

unSpawn 10-23-2006 06:27 PM

// It is usually better to group questions by topic and post different threads. That way you get more exposure.


1 - How i configure the SMTP server (mail.telepac.pt) in sendmail? The specified smtp address belongs to a service provider, and not belongs to my network.
As long as it's your ISP's mailserver that would not be a problem. In your sendmail.mc add the line:
Code:

define(`SMART_HOST', `mail.telepac.pt')
Do i need also a SMTP server installed in my network to redirect the mail messages to the SMTP server from the service provider?
No. If you want to send email from your local email client to a remote address you would just configure the email server of your ISP in your email client.


2 - The sendmail can also receive mail, or this feature belongs to only to fetchmail?
Receiving, relaying and delivery are Sendmails main functions. Fetchmail does only what it says: *fetch* email.


3 - sendmail can also send mail to hosts from my network?
Yes, provided it can resolve the address and is allowed to deliver email to the remote mail host. If you have a dynamic address you best use the Smarthost feature since most dynamic IP ranges get blocked (falsely or preventively) because RBL maintainers are numbnuts or because of (perceived) "damages" like spam, worms and viruses.


4 - What's the advantage of using sendmail, procmail and fetchmail, instead of Thunderbird?
Sendmail is for receiving, relaying and delivering email. You use it if you host mail servers for a domain, to store outbound email if you're on say dialup, to route outbound email through your ISP's mail host or on your LAN if you want to email between machines. Procmail is a delivery agent. It get's its messages from Sendmail or Fetchmail and then puts them in your mailbox or maildir. Fetchmail only fetches email. Having Sendmail, procmail and fetchmail is a complete server-side system for managing and storing email.

The only thing you then need is a user interface like "mail", pine, Mutt or Thunderbird to read email.

If you use Thunderbird with your ISP's email account you're almost always condemned to using POP3 which means you must download email. Now if you have the local Sendmail + Fetchmail setup and install an IMAP server you will have all email in one central place which makes email easier to manage, backup and access (from other LAN hosts). You can also automate stuff like polling for and fetching email, processing vacation replies or spam, sort and deliver email twentyfour hours a day.


5.1 - This means that all the mails that i receive will be appended to the file Mail. Ie, i've a file that contains all the mails? This makes sense?
Yes. You're supposed to add rules to deliver (sort) email into different mailboxes (or "folders" if that sounds better). The "DEFAULT" is a "catchall" so all email that wasn't filtered to other mailboxes gets delivered to a final destination.


6 - Is there any text mode messenger?
Pine and Mutt are the most common commandline email clients, if you mean messenger as in IM, then I wouldn't (wanna) know.


7 - What can i do to simple users have the permission to use the command shutdown and reboot?
Best way is to install and configure sudo for that.


8 - I've and external HD (hard-drive) that sometimes it's turned off when i start linux OS, or i turned on when i'm working in the computer. How can i configure the external hd to be auto mounted in the situations described above?
Probably just needs an Udev or post-hotplug rule or something like devlabel. Try searching LQ.

xeon123 10-24-2006 04:40 AM

unSpawn says:
"4 - What's the advantage of using sendmail, procmail and fetchmail, instead of Thunderbird?


If you use Thunderbird with your ISP's email account you're almost always condemned to using POP3 which means you must download email. Now if you have the local Sendmail + Fetchmail setup and install an IMAP server you will have all email in one central place which makes email easier to manage, backup and access (from other LAN hosts). You can also automate stuff like polling for and fetching email, processing vacation replies or spam, sort and deliver email twentyfour hours a day."

The Thunderbird do all the stuffs specified here. I don't understand the difference in using sendmail, procmail and fetchmail instead of Thunderbird.

The only difference that i see is sendmail, procmail and fetchmail is more difficult to use than Thunderbird.

What's the advantage of using sendmail, procmail and fetchmail, instead of Thunderbird?

Thanks,
Pedro

unSpawn 10-24-2006 07:54 AM

The only difference that i see is sendmail, procmail and fetchmail is more difficult to use than Thunderbird.
The difference is that the combination of Sendmail (MTA) + Procmail (MDA) + Fetchmail is a *server-side and automated* solution for receiving, fetching, processing and storing email. It is way more configurable and versatile compared to Thunderbird. Unlike Thunderbird it is not used for reading email. Thunderbird is "just" one of those client-side mail user agents (MUA) for fetching (,minimal processing) and storing email.

If you find it "more difficult" then you probably don't need it.


All times are GMT -5. The time now is 06:24 AM.