<chapter id="first_ticket">
<title>First Ticket</title>

<sect1 id="what_e-mail_address">
<title>How can somebody write e-mails to the OTRS?</title>
<para>
The default installation will accept e-mails to the local user otrs (e-mail address <email>otrs@localhost</email>). This is good to start a little playing. Use your favourite e-mail client and send an e-mail to this address (of course you have to be on this system). Or you can have a look in the admin section of OTRS to add different e-mail addresses like <email>info@foo.org</email>. But please take care that these e-mails will be delivered to the <emphasis role='bold'>local otrs account</emphasis> (to the <ulink url="http://www.procmail.org/">~otrs/.procmailrc</ulink>)! In case you are not familiar with the configuration of your sendmail or postfix have a look in the man-pages or send an e-mail to the <link linkend="mailinglists">mailinglist</link> <email>otrs@otrs.org</email>.
</para>

<para>
Ok, ok, ... we show you two simple examples.  
</para>

<sect2>
<title>Config of fetchmail</title>
<para>
In order to get e-mails from your mail server via a pop3 mailbox to the 
<emphasis role='bold'>OTRS machine/local otrs account</emphasis> use 
<ulink url="http://www.tuxedo.org/~esr/fetchmail/">fetchmail</ulink>. 
Note: a working SMTP configuration on the OTRS machine is condition. 
</para>

<para>
<example>
<title>.fetchmailrc</title>
<programlisting>
#poll (mailserver) protocol POP3 user (user) password (password) is (localuser)
poll mail.example.com protocol POP3 user joe password mama is otrs
</programlisting>
</example>
</para>
<para>
Don't forget to set the .fetchmailrc to 710 ("chmod 710 .fetchmailrc")!
</para>
<para>
So if "fetchmail -a" is executed (maybe via cron), all e-mails will be forwarded to the local otrs account.
</para>
</sect2>


<sect2>
<title>Config of sendmail in SuSE Linux</title>
<para>
If the machine (where OnTRS is running) is you mail server, you can work directly with the 
virtusertable or aliases. 
</para>
<para>
Lets presume you have a plain SuSE Linux installation with sendmail as a default Mail Transfer Agent and you want to set up a OTRS e-mail account for the e-mail address <email>info@example.com</email>. All you have to do is to add a line to your /etc/mail/virtusertable file. 
</para>
<para>
<example>
<title>/etc/mail/virtusertable</title>
<programlisting>
# /etc/mail/virtusertable
#
# Description:
#
#  A domain-specific form of aliasing, allowing multiple virtual
#  domains to be hosted on one machine.
#
# Examples:
#
#info@foo.com            foo-info
#info@bar.com            bar-info
#joe@bar.com             error:nouser No such user here
#jax@bar.com             error:D.S.N:unavailable Address invalid
#@baz.org                jane@example.net
#

# deliver this e-mails to the local user otrs!
info@example.com         otrs
support@example.com      otrs
</programlisting>
</example>
</para>
<para>
That's it (we actually added a second e-mail address with the name <email>support@example.com</email>! You have to run SuSEconfig.
</para>
<para>
<screen>
skywalker:~ # SuSEconfig
Starting SuSEconfig, the SuSE Configuration Tool...
Running in quick mode.
Reading /etc/rc.config and updating the system...
Executing /sbin/conf.d/SuSEconfig.aaa_at_first...
Executing /sbin/conf.d/SuSEconfig.hostname...
Executing /sbin/conf.d/SuSEconfig.inittab...
Executing /sbin/conf.d/SuSEconfig.pam...
Executing /sbin/conf.d/SuSEconfig.sendmail...
Rebuilding /etc/mail/virtusertable.db.
Executing /sbin/conf.d/SuSEconfig.ypclient...
Finished.
</screen>
</para>
<para>
Reload sendmail (just to be sure).
</para>
<para>
<screen>
skywalker:~ # rcsendmail reload
Reload service sendmail                                done
</screen>
</para>
<para>
Now all incoming e-mail to info@example.com will be delivered to the local user otrs.
</para>
<para>
Every e-mail message to the user otrs will be handled by the procmail-rule of otrs which pipes the e-mail to the system. You will find the e-mail in the RAW queue. 
</para>
</sect2>

</sect1>
</chapter>
