Jump to content

Mail Command [solved]


Recommended Posts

Hi All,

I'm trying to get the mail command to work.

I don't want to setup my own mail server, I just want to use mail to send outgoing mails from the command line or from scripts.

 

I was hoping to set mailrc and main.cf to use my web hosts mail server.

so I set main.cf

myhostname = <smtp.server>

 

am I going in the right direction?

 

I now get a warning and the machine hangs:

 

postdrop: warning: unable to look up public/pickup: No such file or directory

 

 

thanks in advance

Edited by kalliste
Link to comment
Share on other sites

as I understand, myhostname refers to your linux box hostname or a fully qualified domain name, if not, just localhost, try to install postfix, installing it does not mean that you have installed a mail server, its just an MTA or mail tranport agent, just make it listen to localhost so it wont accept connection from outside since your intention is to just be able to do outgoing mail from a command line.

Link to comment
Share on other sites

Here is my main.cf, minus comments, edited to reflect your need:

- mails are transfered to your ISP, and

- there's only very limited support for incoming mail.

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
default_privs = nobody
myhostname = <YOUR FULLY-QUALIFIED HOSTNAME>
mydomain = <THE PART AFTER THE LAST DOT IN YOUR myhostname>
myorigin = $myhostname
mydestination = $myhostname
relayhost = <YOUR ISP SMTP SERVER>
alias_maps = hash:/etc/postfix/aliases
mail_spool_directory = /var/spool/mail
mailbox_command = /usr/bin/procmail -Y -a "$DOMAIN"
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (Mandriva Linux)
debugger_command =
 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
 xxgdb $daemon_directory/$process_name $process_id & sleep 5
delay_warning_time = 12
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.1.5/samples
readme_directory = /usr/share/doc/postfix-2.1.5/README_FILES
disable_dns_lookup = yes
setgid_group = postdrop
unknown_local_recipient_reject_code = 450
html_directory = /usr/share/doc/postfix-2.1.5/html

 

Yves.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...