Skip to content

Accept two main other mail servers#706

Merged
dgibbs64 merged 5 commits intomasterfrom
ultimatebyte-fixes
Feb 21, 2016
Merged

Accept two main other mail servers#706
dgibbs64 merged 5 commits intomasterfrom
ultimatebyte-fixes

Conversation

@UltimateByte
Copy link
Copy Markdown
Contributor

In the end, i went for checking that a mail server is here in any case.
Before the last commit, it wouldn't check packages as long as a mailx folder was detected, which wasn't very clean.

Fixes #695, displayed error if another mail client was installed.
Should fix it for any mail server that makes a /usr/bin/mailx file, displaying a nice package check if exim or sendmail (very popular) are installed :)
so it can add required packages check anyways
@UltimateByte
Copy link
Copy Markdown
Contributor Author

Also, maybe would be cool to add the mail package check on start, and just put a warning, if mail server isn't detected, as people often set this after the installation.

BTW, i can't test it out entirely as i have mail servers installed already and don't have CentOS, but it detects installed mail packages on my debian as expected.

@dgibbs64
Copy link
Copy Markdown
Member

Do these mail servers use the mail command? As that is what LGSM uses

@UltimateByte
Copy link
Copy Markdown
Contributor Author

I found :

Syntax example for exim : mail email@domain.com -s mail-title
Syntax example for sendmail : # echo “This will go into the body of the mail.” | mail -s “Hello world” you@youremailid.com

Seems like they're pretty similar, it's just a matter of how those examples were written.

Seems like all of them require mailx anyway, that must be the one providing the common mailcommand.

@UltimateByte
Copy link
Copy Markdown
Contributor Author

Also found out here http://www.linuxfromscratch.org/blfs/view/cvs/basicnet/mailx.html

That

mail is a symbolic link to mailx.

@dgibbs64
Copy link
Copy Markdown
Member

Im guessing users have been trying to use non postfix mailservers and thats why you are working on this. This is a pain as Its another thing to try and support. I know very little about sendmail and exim4.

If we are to add support for non postfix mail server then Maybe the code should instead look for existing mail servers in check_deps and only reccomend postfix if missing or already installed. Also the email feature would also need to detect sendmail exim4 and postfix then using the relevant command to send an email.

@UltimateByte
Copy link
Copy Markdown
Contributor Author

You're guessing right
#695

Currently, what it does is : If sendmail is installed, it requires sendmail, if exim4 is installed, it requires exim4, otherwise, the behavior isn't changed. Does the mail command changes depending on the mail server ? Seems like they're compatible together.

@dgibbs64
Copy link
Copy Markdown
Member

as per @jaredballou checking for /usr/bin/mailx will probably be the best idea. Should this fail suggest installing postfix. That way if users have an alternative server and mailx is installed that shoudl be OK too.

@UltimateByte
Copy link
Copy Markdown
Contributor Author

OK, i'll change that

Keeping displaying the presence of exim4, sendmail, postfix, mailutils, and mailx in the right case.
@UltimateByte
Copy link
Copy Markdown
Contributor Author

Here, should be fine. Tested, successfully had the right required dependencies onto my server.

Would be great to have it running while using email-test though.
I'll try that.

dgibbs64 added a commit that referenced this pull request Feb 21, 2016
Accept two main other mail servers
@dgibbs64 dgibbs64 merged commit c4976b4 into master Feb 21, 2016
@UltimateByte UltimateByte deleted the ultimatebyte-fixes branch March 1, 2016 07:55
@lock
Copy link
Copy Markdown

lock Bot commented Jul 19, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants