# simple sendmail not working

## cwc

tripwire --test -e root@tma

Sending a test message to: root@tma

sendmail: Cannot open mail:25

### Error: Execution of mail program failed.

### Command: /usr/lib/sendmail -oi -t

### Exiting...

Email test failed.

I'm trying to set up tripwire.  And I get this error when I test it.

I'm really not sure what needs to be installed so I can do simple mail without setting up a mail server.

Any hints?

----------

## Kingmilo

Is your sendmail service running?

```
/etc/init.d/sendmail status
```

```
/etc/init.d/sendmail start
```

I personally prefer postfix, you will need to uninstall sendmail before you install postfix though;

```
emerge -C sendmail
```

```
emerge postfix
```

----------

## cwc

```
 

# emerge postfix

Calculating dependencies... done!

[ebuild  N    ] mail-mta/postfix-2.4.6-r2  USE="ipv6 ldap pam ssl -cdb -dovecot-sasl -hardened -mailwrapper -mbox -mysql -nis -postgres -sasl (-selinux) -vda" 

[blocks B     ] mail-mta/ssmtp (is blocking mail-mta/postfix-2.4.6-r2)

[blocks B     ] mail-mta/postfix (is blocking mail-mta/ssmtp-2.61-r2)

tma ~ # emerge --search postfix

Searching...   

[ Results for search key : postfix ]

[ Applications found : 3 ]

 

*  mail-mta/postfix

      Latest version available: 2.4.6-r2

      Latest version installed: [ Not Installed ]

      Size of files: 2,878 kB

      Homepage:      http://www.postfix.org/

      Description:   A fast and secure drop-in replacement for sendmail.

      License:       IPL-1

*  sec-policy/selinux-postfix

      Latest version available: 20070928

      Latest version installed: [ Not Installed ]

      Size of files: 415 kB

      Homepage:      http://www.gentoo.org/proj/en/hardened/selinux/

      Description:   SELinux policy for postfix

      License:       GPL-2

*  www-apps/postfixadmin [ Masked ]

      Latest version available: 2.1.0-r1

      Latest version installed: [ Not Installed ]

      Size of files: 156 kB

      Homepage:      http://high5.net/postfixadmin/

      Description:   Web Based Management tool for Postfix style virtual domains and users.

      License:       MPL-1.1

```

Can I --unmerge ssmtp

I've never emerge blocked packages.  I'm nervous about installing stuff that might mess things up.

----------

## Kingmilo

Yes go ahead and unmerge 

```
ssmtp
```

----------

## cwc

nice!  Thanks for the help!

I --unmerged ssmtp

then emerged postfix

now the noob needs to know what to do next.

How to I test mail?

----------

## Kingmilo

No problem, have a look at this short wiki it explains exactly what you need to get mail working on your server;

http://gentoo-wiki.com/HOWTO_Email:_A_Complete_Virtual_System_-_Postfix

It is pretty straight forward, if you have any questions let me know.

Cheers.

----------

## cwc

Nice tutorial.

But ...

How else can I test mail without telnet?

I used to know how to do command line email.  Could you please refresh my brain cells on that one.

ciao

---

Hey ... as a side note.

I had a teacher from Limount College visit my classroom yesterday.

She was from West Africa.  Small world..

I'm a MAR site. Microsoft Authorized Refurbisher and she seem interested.

We fix and donate computers.

----------

## aztech

 *cwc wrote:*   

> Nice tutorial.
> 
> But ...
> 
> How else can I test mail without telnet?
> ...

 

As far as I know, Postfix includes a sendmail app also.

After installing postfix, "man sendmail"

```
sendmail - Postfix to Sendmail compatibility interface
```

----------

## cwc

sendmail is not available for non su (root) users.

I followd the wiki.  Did I do something wrong?

----------

## Boko85

 *Kingmilo wrote:*   

> No problem, have a look at this short wiki it explains exactly what you need to get mail working on your server;
> 
> http://gentoo-wiki.com/HOWTO_Email:_A_Complete_Virtual_System_-_Postfix
> 
> It is pretty straight forward, if you have any questions let me know.
> ...

 

Hi.

I'm stuck on "Postfix to Postgres" step.

I followed all instructions there.

But when i try to send an email, there's nothing changed in Postgres databases.

When i try to install and start Courrier Authentication Services, i couldnt login as a test user although that user had already existed in databases.

All my config files will posted later.

----------

