LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 04-14-2014, 11:29 AM   #1
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Trapping system auto-mails to /var/mail without an MTA?


Basically, I'm setting up a Linux From Scratch machine. Everything works great so far, except crap like this:

AT command

Quote:
at Dependencies: Required: an MTA
EDIT:

I've spent more than a day looking at this and it's a fairly common issue that most seem to just give up and install sendmail or postfix in default configuration to solve. (See my next post.)

I might have a go at solving it once I get the system set up. I've got enough source from other apps at this point to see how to wash all that out into only the necessary parts for a workstation or server that is not acting as a proper mail server.

Last edited by Luridis; 04-14-2014 at 06:31 PM.
 
Old 04-14-2014, 03:12 PM   #2
stefan1959
Member
 
Registered: Feb 2006
Posts: 34

Rep: Reputation: 1
Quote:
I mean, this is how things use to work on multi-seat systems before MTA's were around. It can grab stuff and deliver to local accounts, right?
MTA's have been around before linux, you are making it hard for yourself, just install a MTA.


Steve

Last edited by stefan1959; 04-14-2014 at 03:13 PM.
 
Old 04-14-2014, 06:26 PM   #3
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Original Poster
Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by stefan1959 View Post
MTA's have been around before linux, you are making it hard for yourself, just install a MTA.


Steve
Actually, it appears this is an unsolved problem around the net for a lot of people. There are full blown mail servers and then just a couple of smaller projects that deal with the issue specifically as a Lightweight MTA via client protocols to actual mail servers. (SSMPT/Nullmailer) None of which implement an MDA for local-to-local communication. That's not surprising since most MDA's appear to have large libraries used for spam / malware filtering and user quotas. The big name servers are large and complicated beasts that no one wants to touch, even on a workstation, delivering only automated messages.

Now that I've read enough to understand the issue. What is needed for non-mail servers and desktops, as a mail handler, is a pseudo-MTA wrapper, i.e. "sendmail -i" impersonator/pipe-processor, in a very simple MTA. This MTA would speak to actual MTA Servers through client protocols AND to a local light MDA. The local MDA would only accept mail from the local MTA (users and processes), and need not provide spam/malware filters as it's only purpose is to accept job to User-Y or event to local root mail, etc.

In other words, a single-seat, client-centric MTA that handles only local mail.

Last edited by Luridis; 04-14-2014 at 06:27 PM.
 
Old 04-14-2014, 06:38 PM   #4
stefan1959
Member
 
Registered: Feb 2006
Posts: 34

Rep: Reputation: 1
Quote:
Originally Posted by Luridis View Post
Actually, it appears this is an unsolved problem around the net for a lot of people. There are full blown mail servers and then just a couple of smaller projects that deal with the issue specifically as a Lightweight MTA via client protocols to actual mail servers. (SSMPT/Nullmailer) None of which implement an MDA for local-to-local communication. That's not surprising since most MDA's appear to have large libraries used for spam / malware filtering and user quotas. The big name servers are large and complicated beasts that no one wants to touch, even on a workstation, delivering only automated messages.

Now that I've read enough to understand the issue. What is needed for non-mail servers and desktops, as a mail handler, is a pseudo-MTA wrapper, i.e. "sendmail -i" impersonator/pipe-processor, in a very simple MTA. This MTA would speak to actual MTA Servers through client protocols AND to a local light MDA. The local MDA would only accept mail from the local MTA (users and processes), and need not provide spam/malware filters as it's only purpose is to accept job to User-Y or event to local root mail, etc.

In other words, a single-seat, client-centric MTA that handles only local mail.
What mail is the system generating? Or are you writing the mail. Can cron job be of help?

Steve
 
Old 04-14-2014, 08:26 PM   #5
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Original Poster
Rep: Reputation: 167Reputation: 167
I'm building a Linux From Scratch, the issue is packages that require... sendmail, that are not "mail applications." Sendmail is a bag of frustration for people whom do not need or want a mail server, yet some applications insist on it's presence to deliver automated messages.

Hence the need for a lightweight MTA & MDA that impersonates sendmail and only does: local-to-local and local-to-outbound via client protocols. This doesn't appear to exist currently, in spite of it being ideal for desktops and servers that aren't mail-servers. A minimal and uncomplicated configuration file.

I think this will most likely be my first free software project, it or a frame-buffer configuration utility.
 
Old 04-14-2014, 10:44 PM   #6
stefan1959
Member
 
Registered: Feb 2006
Posts: 34

Rep: Reputation: 1
Quote:
Originally Posted by Luridis View Post
I'm building a Linux From Scratch, the issue is packages that require... sendmail, that are not "mail applications." Sendmail is a bag of frustration for people whom do not need or want a mail server, yet some applications insist on it's presence to deliver automated messages.

Hence the need for a lightweight MTA & MDA that impersonates sendmail and only does: local-to-local and local-to-outbound via client protocols. This doesn't appear to exist currently, in spite of it being ideal for desktops and servers that aren't mail-servers. A minimal and uncomplicated configuration file.

I think this will most likely be my first free software project, it or a frame-buffer configuration utility.
Sendmail is all I've ever used, ran a small isp for a while.

One reason I put put webmin on, alows for easier config of programs like sendmail.
http://www.linuxquestions.org/questi...ed-4175501416/
BLFS has other MTA's. Not sure whats the easiest to config as I've never used them

P.S. I installed Exim and dovcot, managed to get it working locally after some goggling the errors I got in the mail log after the install.

Steve

Last edited by stefan1959; 04-15-2014 at 12:18 AM.
 
Old 04-16-2014, 05:16 AM   #7
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Original Poster
Rep: Reputation: 167Reputation: 167
Well, if you're wondering how this worked out for me, if you're someone whom came looking for a system services to root only setup; I've now found that this is fairly easy to do with a script.

Quote:
cat > /usr/sbin/sendmail.sh << "EOF"

#!/bin/bash
# Begin /usr/sbin/sendmail.sh
#
# Spools mail from local daemons to local root mailbox.
# This works by reading the stdin from programs that are
# trying to send mail by executing "sendmail -i" and
# piping the MIME-message-data on the stdout.
# This script won't work for anything looking for a
# network port. aka localhost:25/587

while read sysmail; do
echo -e $sysmail >> /var/mail/root
done

echo "" >> /var/mail/root

# End /usr/sbin/sendmail.sh
EOF

chmod -v 4655 /usr/sbin/sendmail.sh
ln -sv /usr/sbin/sendmail.sh sendmail
You'll probably at least need to install mailx as well. But daemons can now pipe all their mail to root's mailbox. One thing I'd watch is making sure none of the daemons are setup to deliver logs as attachments or mail in html format. Plain text MIME is fine.

If you do setup mailx (some of the daemons use it), locking down execution to a daemon group might be something to do if you're vulnerability paranoid. That way, only daemons can send mail.

Last edited by Luridis; 04-16-2014 at 05:36 AM. Reason: Mailx note...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mail service required on client system to get the mails from server ??? rohitchauhan Linux - Server 1 09-21-2013 11:18 PM
How to increase the rate of mails from Interspire Email Marketer to Postfix MTA jayram1989 Linux - Software 0 09-07-2013 04:45 PM
whar are mails in /var/spool/mail/root ? mq15 Linux - Newbie 2 04-26-2009 04:39 PM
To restrict a user to send mails only to 3 e-mails IDs using postfix mail server sharath41 Linux - Newbie 2 07-21-2008 07:38 PM
script to count the mails in an users folder "/var/spool/mail/user" sharad Linux - Software 1 03-16-2006 10:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 02:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration