<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.linuxquestions.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=MattHucke</id>
	<title>LQWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.linuxquestions.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=MattHucke"/>
	<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/wiki/Special:Contributions/MattHucke"/>
	<updated>2026-04-19T10:15:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.0</generator>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Shell_prompt&amp;diff=38658</id>
		<title>Shell prompt</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Shell_prompt&amp;diff=38658"/>
		<updated>2008-05-03T13:40:26Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: disambiguate&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:''The term '''shell prompt''' is often used as a synonym for '''[[command line interface]]''' or '''[[terminal]]'''.''  &lt;br /&gt;
:''This article, however, is about the prompt itself, which is part of the '''CLI''.'''&lt;br /&gt;
&lt;br /&gt;
A '''shell prompt''' is a prompt (a bit of text) printed by the [[shell]] to indicate it is ready to receive a shell [[command]]. Typically, it looks like this:&lt;br /&gt;
 tweedleburg:~ #&lt;br /&gt;
In this example, tweedleburg is your computer's [[hostName]].&lt;br /&gt;
&lt;br /&gt;
The shell prompt is highly customizable, and is often set by [[.profile]] or equivalent files.&lt;br /&gt;
&lt;br /&gt;
== sh shells ==&lt;br /&gt;
&lt;br /&gt;
In shells based upon /bin/sh, the shell prompt traditionally ends with '''$''' for ordinary users and '''#''' for root.  It is set by means of the PS1 variable.   A minimalist example:&lt;br /&gt;
&lt;br /&gt;
    export PS1=&amp;quot;$LOGNAME\$&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For detailed examples and syntax, see the articles for various implementations:&lt;br /&gt;
&lt;br /&gt;
* [[bash]] - see [[bash prompt]]&lt;br /&gt;
* [[zsh]]&lt;br /&gt;
* [[ksh]]&lt;br /&gt;
&lt;br /&gt;
== csh shells ==&lt;br /&gt;
&lt;br /&gt;
For [[csh]] and related shells, the prompt is traditionally '''%''' for non-root users.&lt;br /&gt;
&lt;br /&gt;
    set prompt=&amp;quot;$user% &amp;quot;&lt;br /&gt;
&lt;br /&gt;
* [[csh]]&lt;br /&gt;
* [[tcsh]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Shell]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Prompt&amp;diff=38657</id>
		<title>Prompt</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Prompt&amp;diff=38657"/>
		<updated>2008-05-03T13:38:10Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: link to new article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Prompt''' - An area to enter input, often denoted by a symbol such as '#', '$', '%', '&amp;gt;', '?', etc. &lt;br /&gt;
&lt;br /&gt;
A [[shell prompt]] is part of a [[command line interface]].&lt;br /&gt;
&lt;br /&gt;
Example of a Linux command prompt, waiting for commands to be entered:&lt;br /&gt;
&lt;br /&gt;
 [jdoe@localhost ~]$&lt;br /&gt;
&lt;br /&gt;
For details of how to customize your prompt, see the [[shell prompt]] article, and the articles on various [[shell|shells]].&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Postfix_Shared_domains,_UNIX_system_accounts&amp;diff=38651</id>
		<title>Postfix Shared domains, UNIX system accounts</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Postfix_Shared_domains,_UNIX_system_accounts&amp;diff=38651"/>
		<updated>2008-05-02T20:47:40Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: recat as postfix article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The simplest method to host an additional domain within [[postfix]] is to add the domain name to the domains listed in the Postfix mydestination configuration parameter, and to add the user names to the UNIX password file.&lt;br /&gt;
&lt;br /&gt;
This approach makes no distinction between canonical and [[hosted domain]]s. Each username can receive mail in every domain.&lt;br /&gt;
&lt;br /&gt;
In the examples we will use &amp;quot;example.com&amp;quot; as the domain that is being hosted on the local Postfix machine.&lt;br /&gt;
&lt;br /&gt;
  /etc/postfix/main.cf:&lt;br /&gt;
    mydestination = $myhostname localhost.$mydomain ... example.com&lt;br /&gt;
&lt;br /&gt;
The limitations of this approach are:&lt;br /&gt;
* A total lack of separation: mail for info@my.host.name is delivered to the same UNIX system account as mail for info@example.com.&lt;br /&gt;
* With users in the UNIX password file, administration of large numbers of users becomes inconvenient. &lt;br /&gt;
&lt;br /&gt;
The examples that follow provide solutions for both limitations.&lt;br /&gt;
&lt;br /&gt;
[[Category:Postfix]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Shared_domains,_UNIX_system_accounts&amp;diff=38650</id>
		<title>Shared domains, UNIX system accounts</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Shared_domains,_UNIX_system_accounts&amp;diff=38650"/>
		<updated>2008-05-02T20:47:13Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: Shared domains, UNIX system accounts moved to Postfix Shared domains, UNIX system accounts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Postfix Shared domains, UNIX system accounts]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Postfix_Shared_domains,_UNIX_system_accounts&amp;diff=38649</id>
		<title>Postfix Shared domains, UNIX system accounts</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Postfix_Shared_domains,_UNIX_system_accounts&amp;diff=38649"/>
		<updated>2008-05-02T20:47:13Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: Shared domains, UNIX system accounts moved to Postfix Shared domains, UNIX system accounts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The simplest method to host an additional domain within [[postfix]] is to add the domain name to the domains listed in the Postfix mydestination configuration parameter, and to add the user names to the UNIX password file.&lt;br /&gt;
&lt;br /&gt;
This approach makes no distinction between canonical and [[hosted domain]]s. Each username can receive mail in every domain.&lt;br /&gt;
&lt;br /&gt;
In the examples we will use &amp;quot;example.com&amp;quot; as the domain that is being hosted on the local Postfix machine.&lt;br /&gt;
&lt;br /&gt;
  /etc/postfix/main.cf:&lt;br /&gt;
    mydestination = $myhostname localhost.$mydomain ... example.com&lt;br /&gt;
&lt;br /&gt;
The limitations of this approach are:&lt;br /&gt;
* A total lack of separation: mail for info@my.host.name is delivered to the same UNIX system account as mail for info@example.com.&lt;br /&gt;
* With users in the UNIX password file, administration of large numbers of users becomes inconvenient. &lt;br /&gt;
&lt;br /&gt;
The examples that follow provide solutions for both limitations.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mail]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Postgrey&amp;diff=38645</id>
		<title>Postgrey</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Postgrey&amp;diff=38645"/>
		<updated>2008-05-02T20:16:22Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: cat postfix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Postgrey is [[greyListing]] [[software]] for the [[postfix]] [[MTA]].&lt;br /&gt;
&lt;br /&gt;
= How to get it =&lt;br /&gt;
&lt;br /&gt;
Download postgrey from http://postgrey.schweikert.ch/&lt;br /&gt;
&lt;br /&gt;
= How to set it up =&lt;br /&gt;
&lt;br /&gt;
* [[Extract]] your [[postgrey]] [[package]]&lt;br /&gt;
* Copy postgrey_whitelist_clients to /etc/postfix/&lt;br /&gt;
* Copy postgrey_whitelist_recipients to /etc/postfix/ &lt;br /&gt;
* Add a user named postgrey:&lt;br /&gt;
 useradd -m postgrey&lt;br /&gt;
* start postgrey&lt;br /&gt;
 ./postgrey --inet 127.0.0.1:60000&lt;br /&gt;
* make sure postgrey is listening on port 60000:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nmap localhost -p59998-60002&lt;br /&gt;
&lt;br /&gt;
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2007-08-10 07:44 CEST&lt;br /&gt;
Interesting ports on lvps87-230-12-146.dedicated.hosteurope.de (127.0.0.1):&lt;br /&gt;
PORT      STATE  SERVICE&lt;br /&gt;
59998/tcp closed unknown&lt;br /&gt;
59999/tcp closed unknown&lt;br /&gt;
60000/tcp open   unknown&lt;br /&gt;
60001/tcp closed unknown&lt;br /&gt;
60002/tcp closed unknown&lt;br /&gt;
&lt;br /&gt;
Nmap finished: 1 IP address (1 host up) scanned in 0.049 seconds&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Make sure there is a line like this in /etc/postfix/main.cf:&lt;br /&gt;
 smtpd_recipient_restrictions = permit_mynetworks,&lt;br /&gt;
                                 permit_sasl_authenticated,&lt;br /&gt;
                                 reject_unauth_destination,&lt;br /&gt;
                                 check_policy_service  inet:127.0.0.1:60000&lt;br /&gt;
* restart postfix&lt;br /&gt;
 /etc/init.d/postfix restart&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
http://www.debuntu.org/postfix-and-postgrey-a-proactive-approach-to-spam-filtering&lt;br /&gt;
&lt;br /&gt;
[[Category:Mail]]&lt;br /&gt;
[[Category:Postfix]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Postfix_virtual_transport&amp;diff=38644</id>
		<title>Postfix virtual transport</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Postfix_virtual_transport&amp;diff=38644"/>
		<updated>2008-05-02T20:14:30Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: cat postfix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a variation on the Postfix virtual mailbox example. Again, every hosted address can have its own mailbox.&lt;br /&gt;
&lt;br /&gt;
While non-Postfix software is being used for final delivery, some Postfix concepts are still needed in order to glue everything together. For additional background on this glue you may want to take a look at the virtual mailbox domain class as defined in the ADDRESS_CLASS_README file.&lt;br /&gt;
&lt;br /&gt;
The text in this section describes what things should look like from Postfix's point of view. See CYRUS_README or MAILDROP_README for specific information about Cyrus or about Courier maildrop.&lt;br /&gt;
&lt;br /&gt;
Here is an example for a hosted domain example.com that delivers to a non-Postfix delivery agent:&lt;br /&gt;
&lt;br /&gt;
  1 /etc/postfix/main.cf:&lt;br /&gt;
  2     virtual_transport = ...see below...&lt;br /&gt;
  3     virtual_mailbox_domains = example.com ...more domains...&lt;br /&gt;
  4     virtual_mailbox_maps = hash:/etc/postfix/vmailbox&lt;br /&gt;
  5     virtual_alias_maps = hash:/etc/postfix/virtual&lt;br /&gt;
  6 &lt;br /&gt;
  7 /etc/postfix/vmailbox:&lt;br /&gt;
  8     info@example.com    whatever&lt;br /&gt;
  9     sales@example.com   whatever&lt;br /&gt;
 10     # Comment out the entry below to implement a catch-all.&lt;br /&gt;
 11     # Configure the mailbox store to accept all addresses.&lt;br /&gt;
 12     # @example.com      whatever&lt;br /&gt;
 13     ...virtual mailboxes for more domains...&lt;br /&gt;
 14 &lt;br /&gt;
 15 /etc/postfix/virtual:&lt;br /&gt;
 16     postmaster@example.com postmaster&lt;br /&gt;
&lt;br /&gt;
'''Notes:'''&lt;br /&gt;
&lt;br /&gt;
* Line 2: With delivery to a non-Postfix mailbox store for hosted domains, the virtual_transport parameter usually specifies the Postfix LMTP client, or the name of a master.cf entry that executes non-Postfix software via the pipe delivery agent. Typical examples (use only one):&lt;br /&gt;
&lt;br /&gt;
   virtual_transport = lmtp:unix:/path/name (uses UNIX-domain socket)&lt;br /&gt;
   virtual_transport = lmtp:hostname:port   (uses TCP socket)&lt;br /&gt;
   virtual_transport = maildrop:            (uses pipe(8) to command)&lt;br /&gt;
&lt;br /&gt;
Postfix comes ready with support for LMTP. And an example maildrop delivery method is already defined in the default Postfix master.cf file. See the MAILDROP_README document for more details.&lt;br /&gt;
&lt;br /&gt;
* Line 3: The virtual_mailbox_domains setting tells Postfix that example.com is delivered via the virtual_transport that was discussed in the previous paragraph. If you omit this virtual_mailbox_domains setting then Postfix will either reject mail (relay access denied) or will not be able to deliver it (mail for example.com loops back to myself).&lt;br /&gt;
&lt;br /&gt;
''NEVER list a virtual MAILBOX domain name as a mydestination domain!''&lt;br /&gt;
&lt;br /&gt;
''NEVER list a virtual MAILBOX domain name as a virtual ALIAS domain!''&lt;br /&gt;
&lt;br /&gt;
* Lines 4, 7-13: The virtual_mailbox_maps parameter specifies the lookup table with all valid recipient addresses. The lookup result is ignored by Postfix. In the above example, info@example.com and sales@example.com are listed as valid addresses, and mail for anything else is rejected with &amp;quot;User unknown&amp;quot;. If you intend to use LDAP, MySQL or PgSQL instead of local files, be sure to review the &amp;quot;local files versus databases&amp;quot; section at the top of this document!&lt;br /&gt;
&lt;br /&gt;
* Line 12: The commented out entry (text after #) shows how one would inform Postfix of the existence of a catch-all address. Again, the lookup result is ignored by Postfix.&lt;br /&gt;
&lt;br /&gt;
''NEVER put a virtual MAILBOX wild-card in the virtual ALIAS file!!''&lt;br /&gt;
&lt;br /&gt;
Note: if you specify a wildcard in virtual_mailbox_maps, then you still need to configure the non-Postfix mailbox store to receive mail for any address in that domain.&lt;br /&gt;
&lt;br /&gt;
* Lines 5, 15, 16: As you see above, it is possible to mix virtual aliases with virtual mailboxes. We use this feature to redirect mail for example.com's postmaster address to the local postmaster. You can use the same mechanism to redirect any addresses to a local or remote address.&lt;br /&gt;
&lt;br /&gt;
* Line 16: This example assumes that in main.cf, $myorigin is listed under the mydestination parameter setting. If that is not the case, specify an explicit domain name on the right-hand side of the virtual alias table entries or else mail will go to the wrong domain.&lt;br /&gt;
&lt;br /&gt;
Execute the command &amp;quot;postmap /etc/postfix/virtual&amp;quot; after changing the virtual file, execute &amp;quot;postmap /etc/postfix/vmailbox&amp;quot; after changing the vmailbox file, and execute the command &amp;quot;postfix reload&amp;quot; after changing the main.cf file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Postfix]]&lt;br /&gt;
[[Category:Example]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Non-Postfix_mailbox_store:_separate_domains,_non-UNIX_accounts&amp;diff=38643</id>
		<title>Non-Postfix mailbox store: separate domains, non-UNIX accounts</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Non-Postfix_mailbox_store:_separate_domains,_non-UNIX_accounts&amp;diff=38643"/>
		<updated>2008-05-02T20:13:53Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: Non-Postfix mailbox store: separate domains, non-UNIX accounts moved to Postfix virtual transport: simplify title, and it should say &amp;quot;Postfix&amp;quot; because this is a postfix config article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Postfix virtual transport]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Postfix_virtual_transport&amp;diff=38642</id>
		<title>Postfix virtual transport</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Postfix_virtual_transport&amp;diff=38642"/>
		<updated>2008-05-02T20:13:53Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: Non-Postfix mailbox store: separate domains, non-UNIX accounts moved to Postfix virtual transport: simplify title, and it should say &amp;quot;Postfix&amp;quot; because this is a postfix config article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a variation on the Postfix virtual mailbox example. Again, every hosted address can have its own mailbox.&lt;br /&gt;
&lt;br /&gt;
While non-Postfix software is being used for final delivery, some Postfix concepts are still needed in order to glue everything together. For additional background on this glue you may want to take a look at the virtual mailbox domain class as defined in the ADDRESS_CLASS_README file.&lt;br /&gt;
&lt;br /&gt;
The text in this section describes what things should look like from Postfix's point of view. See CYRUS_README or MAILDROP_README for specific information about Cyrus or about Courier maildrop.&lt;br /&gt;
&lt;br /&gt;
Here is an example for a hosted domain example.com that delivers to a non-Postfix delivery agent:&lt;br /&gt;
&lt;br /&gt;
  1 /etc/postfix/main.cf:&lt;br /&gt;
  2     virtual_transport = ...see below...&lt;br /&gt;
  3     virtual_mailbox_domains = example.com ...more domains...&lt;br /&gt;
  4     virtual_mailbox_maps = hash:/etc/postfix/vmailbox&lt;br /&gt;
  5     virtual_alias_maps = hash:/etc/postfix/virtual&lt;br /&gt;
  6 &lt;br /&gt;
  7 /etc/postfix/vmailbox:&lt;br /&gt;
  8     info@example.com    whatever&lt;br /&gt;
  9     sales@example.com   whatever&lt;br /&gt;
 10     # Comment out the entry below to implement a catch-all.&lt;br /&gt;
 11     # Configure the mailbox store to accept all addresses.&lt;br /&gt;
 12     # @example.com      whatever&lt;br /&gt;
 13     ...virtual mailboxes for more domains...&lt;br /&gt;
 14 &lt;br /&gt;
 15 /etc/postfix/virtual:&lt;br /&gt;
 16     postmaster@example.com postmaster&lt;br /&gt;
&lt;br /&gt;
'''Notes:'''&lt;br /&gt;
&lt;br /&gt;
* Line 2: With delivery to a non-Postfix mailbox store for hosted domains, the virtual_transport parameter usually specifies the Postfix LMTP client, or the name of a master.cf entry that executes non-Postfix software via the pipe delivery agent. Typical examples (use only one):&lt;br /&gt;
&lt;br /&gt;
   virtual_transport = lmtp:unix:/path/name (uses UNIX-domain socket)&lt;br /&gt;
   virtual_transport = lmtp:hostname:port   (uses TCP socket)&lt;br /&gt;
   virtual_transport = maildrop:            (uses pipe(8) to command)&lt;br /&gt;
&lt;br /&gt;
Postfix comes ready with support for LMTP. And an example maildrop delivery method is already defined in the default Postfix master.cf file. See the MAILDROP_README document for more details.&lt;br /&gt;
&lt;br /&gt;
* Line 3: The virtual_mailbox_domains setting tells Postfix that example.com is delivered via the virtual_transport that was discussed in the previous paragraph. If you omit this virtual_mailbox_domains setting then Postfix will either reject mail (relay access denied) or will not be able to deliver it (mail for example.com loops back to myself).&lt;br /&gt;
&lt;br /&gt;
''NEVER list a virtual MAILBOX domain name as a mydestination domain!''&lt;br /&gt;
&lt;br /&gt;
''NEVER list a virtual MAILBOX domain name as a virtual ALIAS domain!''&lt;br /&gt;
&lt;br /&gt;
* Lines 4, 7-13: The virtual_mailbox_maps parameter specifies the lookup table with all valid recipient addresses. The lookup result is ignored by Postfix. In the above example, info@example.com and sales@example.com are listed as valid addresses, and mail for anything else is rejected with &amp;quot;User unknown&amp;quot;. If you intend to use LDAP, MySQL or PgSQL instead of local files, be sure to review the &amp;quot;local files versus databases&amp;quot; section at the top of this document!&lt;br /&gt;
&lt;br /&gt;
* Line 12: The commented out entry (text after #) shows how one would inform Postfix of the existence of a catch-all address. Again, the lookup result is ignored by Postfix.&lt;br /&gt;
&lt;br /&gt;
''NEVER put a virtual MAILBOX wild-card in the virtual ALIAS file!!''&lt;br /&gt;
&lt;br /&gt;
Note: if you specify a wildcard in virtual_mailbox_maps, then you still need to configure the non-Postfix mailbox store to receive mail for any address in that domain.&lt;br /&gt;
&lt;br /&gt;
* Lines 5, 15, 16: As you see above, it is possible to mix virtual aliases with virtual mailboxes. We use this feature to redirect mail for example.com's postmaster address to the local postmaster. You can use the same mechanism to redirect any addresses to a local or remote address.&lt;br /&gt;
&lt;br /&gt;
* Line 16: This example assumes that in main.cf, $myorigin is listed under the mydestination parameter setting. If that is not the case, specify an explicit domain name on the right-hand side of the virtual alias table entries or else mail will go to the wrong domain.&lt;br /&gt;
&lt;br /&gt;
Execute the command &amp;quot;postmap /etc/postfix/virtual&amp;quot; after changing the virtual file, execute &amp;quot;postmap /etc/postfix/vmailbox&amp;quot; after changing the vmailbox file, and execute the command &amp;quot;postfix reload&amp;quot; after changing the main.cf file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mail]]&lt;br /&gt;
[[Category:Example]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Postfix_-_local_files_versus_network_databases&amp;diff=38641</id>
		<title>Postfix - local files versus network databases</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Postfix_-_local_files_versus_network_databases&amp;diff=38641"/>
		<updated>2008-05-02T20:00:54Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: recat&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Local files versus network databases ==&lt;br /&gt;
The examples in this text use table lookups from local files such as DBM or Berkeley DB. These are easy to debug with the [[postmap]] command:&lt;br /&gt;
&lt;br /&gt;
    [[postmap]] -q info@example.com hash:/etc/postfix/virtual &lt;br /&gt;
&lt;br /&gt;
See the documentation in [[LDAP|LDAP_README]], [[MySQL|MYSQL_README]] and [[PGSQL|PGSQL_README]] for how to replace local files by databases. The reader is strongly advised to make the system work with local files before migrating to network databases, and to use the postmap command to verify that network database lookups produce the exact same results as local file lookup.&lt;br /&gt;
&lt;br /&gt;
    [[postmap]] -q info@example.com ldap:/etc/postfix/virtual.cf&lt;br /&gt;
&lt;br /&gt;
[[Category:Postfix]]&lt;br /&gt;
[[Category:Example]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Talk:Local_files_versus_network_databases&amp;diff=38640</id>
		<title>Talk:Local files versus network databases</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Talk:Local_files_versus_network_databases&amp;diff=38640"/>
		<updated>2008-05-02T20:00:29Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: Talk:Local files versus network databases moved to Talk:Postfix - local files versus network databases: clarify what this is about&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Talk:Postfix - local files versus network databases]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Talk:Postfix_-_local_files_versus_network_databases&amp;diff=38639</id>
		<title>Talk:Postfix - local files versus network databases</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Talk:Postfix_-_local_files_versus_network_databases&amp;diff=38639"/>
		<updated>2008-05-02T20:00:29Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: Talk:Local files versus network databases moved to Talk:Postfix - local files versus network databases: clarify what this is about&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If I hadn't known before, I would still ask myself what the difference between a file and a database is.&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Local_files_versus_network_databases&amp;diff=38638</id>
		<title>Local files versus network databases</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Local_files_versus_network_databases&amp;diff=38638"/>
		<updated>2008-05-02T20:00:29Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: Local files versus network databases moved to Postfix - local files versus network databases: clarify what this is about&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Postfix - local files versus network databases]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Postfix_-_local_files_versus_network_databases&amp;diff=38637</id>
		<title>Postfix - local files versus network databases</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Postfix_-_local_files_versus_network_databases&amp;diff=38637"/>
		<updated>2008-05-02T20:00:29Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: Local files versus network databases moved to Postfix - local files versus network databases: clarify what this is about&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Local files versus network databases ==&lt;br /&gt;
The examples in this text use table lookups from local files such as DBM or Berkeley DB. These are easy to debug with the [[postmap]] command:&lt;br /&gt;
&lt;br /&gt;
    [[postmap]] -q info@example.com hash:/etc/postfix/virtual &lt;br /&gt;
&lt;br /&gt;
See the documentation in [[LDAP|LDAP_README]], [[MySQL|MYSQL_README]] and [[PGSQL|PGSQL_README]] for how to replace local files by databases. The reader is strongly advised to make the system work with local files before migrating to network databases, and to use the postmap command to verify that network database lookups produce the exact same results as local file lookup.&lt;br /&gt;
&lt;br /&gt;
    [[postmap]] -q info@example.com ldap:/etc/postfix/virtual.cf&lt;br /&gt;
&lt;br /&gt;
[[Category:Mail]]&lt;br /&gt;
[[Category:Example]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Postfix_Virtual_Domain_Hosting&amp;diff=38636</id>
		<title>Postfix Virtual Domain Hosting</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Postfix_Virtual_Domain_Hosting&amp;diff=38636"/>
		<updated>2008-05-02T19:59:30Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: change cat to Postfix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''virtual domain support in Postfix''' is actually quite robust. There are different ways you host virtual domains with Postfix.&lt;br /&gt;
&lt;br /&gt;
* [[Canonical versus hosted versus other domains]]&lt;br /&gt;
&lt;br /&gt;
* [[Local files versus network databases]]&lt;br /&gt;
** [[Shared domains, UNIX system accounts]]&lt;br /&gt;
** [[Postfix virtual ALIAS example: separate domains, UNIX system accounts]]&lt;br /&gt;
** [[Postfix virtual MAILBOX example: separate domains, non-UNIX accounts]]&lt;br /&gt;
** [[Non-Postfix mailbox store: separate domains, non-UNIX accounts]]&lt;br /&gt;
** [[Mail forwarding domains]]&lt;br /&gt;
** [[Mailing lists]]&lt;br /&gt;
** [[Autoreplies]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Postfix]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Postfix_virtual_ALIAS_example:_separate_domains,_UNIX_system_accounts&amp;diff=38635</id>
		<title>Postfix virtual ALIAS example: separate domains, UNIX system accounts</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Postfix_virtual_ALIAS_example:_separate_domains,_UNIX_system_accounts&amp;diff=38635"/>
		<updated>2008-05-02T19:58:49Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: change cat to Postfix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Postfix virtual ALIAS example: separate domains, UNIX system accounts ==&lt;br /&gt;
With the approach described in this section, every hosted domain can have its own info etc. email address. However, it still uses UNIX system accounts for local mailbox deliveries.&lt;br /&gt;
&lt;br /&gt;
With virtual alias domains, each hosted address is aliased to a local UNIX system account or to a remote address. The example below shows how to use this mechanism for the example.com domain.&lt;br /&gt;
&lt;br /&gt;
  1 /etc/postfix/main.cf:&lt;br /&gt;
  2     virtual_alias_domains = example.com ...other hosted domains...&lt;br /&gt;
  3     virtual_alias_maps = hash:/etc/postfix/virtual&lt;br /&gt;
  4 &lt;br /&gt;
  5 /etc/postfix/virtual:&lt;br /&gt;
  6     postmaster@example.com postmaster&lt;br /&gt;
  7     info@example.com       joe&lt;br /&gt;
  8     sales@example.com      jane&lt;br /&gt;
  9     # Uncomment entry below to implement a catch-all address&lt;br /&gt;
 10     # @example.com         jim&lt;br /&gt;
 11     ...virtual aliases for more domains...&lt;br /&gt;
&lt;br /&gt;
'''Notes:'''&lt;br /&gt;
&lt;br /&gt;
* Line 2: the virtual_alias_domains setting tells Postfix that example.com is a so-called virtual alias domain. If you omit this setting then Postfix will reject mail (relay access denied) or will not be able to deliver it (mail for example.com loops back to myself).&lt;br /&gt;
&lt;br /&gt;
''NEVER list a virtual alias domain name as a mydestination domain!''&lt;br /&gt;
&lt;br /&gt;
* Lines 3-8: the /etc/postfix/virtual file contains the virtual aliases. With the example above, mail for postmaster@example.com goes to the local postmaster, while mail for info@example.com goes to the UNIX account joe, and mail for sales@example.com goes to the UNIX account jane. Mail for all other addresses in example.com is rejected with the error message &amp;quot;User unknown&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Line 10: the commented out entry (text after #) shows how one would implement a catch-all virtual alias that receives mail for every example.com address not listed in the virtual alias file. This is not without risk. Spammers nowadays try to send mail from (or mail to) every possible name that they can think of. A catch-all mailbox is likely to receive many spam messages, and many bounces for spam messages that were sent in the name of anything@example.com.&lt;br /&gt;
&lt;br /&gt;
Execute the command &amp;quot;postmap /etc/postfix/virtual&amp;quot; after changing the virtual file, and execute the command &amp;quot;postfix reload&amp;quot; after changing the main.cf file.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' virtual aliases can resolve to a local address or to a remote address, or both. They don't have to resolve to UNIX system accounts on your machine.&lt;br /&gt;
&lt;br /&gt;
More details about the virtual alias file are given in the virtual(5) manual page, including multiple addresses on the right-hand side.&lt;br /&gt;
&lt;br /&gt;
Virtual aliasing solves one problem: it allows each domain to have its own info mail address. But there still is one drawback: each virtual address is aliased to a UNIX system account. As you add more virtual addresses you also add more UNIX system accounts. The next section eliminates this problem.&lt;br /&gt;
&lt;br /&gt;
[[Category:Postfix]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Postfix_virtual_MAILBOX_example:_separate_domains,_non-UNIX_accounts&amp;diff=38634</id>
		<title>Postfix virtual MAILBOX example: separate domains, non-UNIX accounts</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Postfix_virtual_MAILBOX_example:_separate_domains,_non-UNIX_accounts&amp;diff=38634"/>
		<updated>2008-05-02T19:58:29Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: change cat to Postfix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Postfix virtual MAILBOX example: separate domains, non-UNIX accounts ==&lt;br /&gt;
As a system hosts more and more domains and users, it becomes less desirable to give every user their own UNIX system account.&lt;br /&gt;
&lt;br /&gt;
With the Postfix virtual(8) mailbox delivery agent, every recipient address can have its own virtual mailbox. Unlike virtual alias domains, virtual mailbox domains do not need the clumsy translation from each recipient addresses into a different address, and owners of a virtual mailbox address do not need to have a UNIX system account.&lt;br /&gt;
&lt;br /&gt;
The Postfix virtual(8) mailbox delivery agent looks up the user mailbox pathname, uid and gid via separate tables that are searched with the recipient's mail address. Maildir style delivery is turned on by terminating the mailbox pathname with &amp;quot;/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you find the idea of multiple tables bothersome, remember that you can migrate the information (once it works), to an SQL database. If you take that route, be sure to review the &amp;quot;local files versus databases&amp;quot; section at the top of this document.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a virtual mailbox domain &amp;quot;example.com&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
  1 /etc/postfix/main.cf:&lt;br /&gt;
  2     virtual_mailbox_domains = example.com ...more domains...&lt;br /&gt;
  3     virtual_mailbox_base = /var/mail/vhosts&lt;br /&gt;
  4     virtual_mailbox_maps = hash:/etc/postfix/vmailbox&lt;br /&gt;
  5     virtual_minimum_uid = 100&lt;br /&gt;
  6     virtual_uid_maps = static:5000&lt;br /&gt;
  7     virtual_gid_maps = static:5000&lt;br /&gt;
  8     virtual_alias_maps = hash:/etc/postfix/virtual&lt;br /&gt;
  9 &lt;br /&gt;
 10 /etc/postfix/vmailbox:&lt;br /&gt;
 11     info@example.com    example.com/info&lt;br /&gt;
 12     sales@example.com   example.com/sales/&lt;br /&gt;
 13     # Comment out the entry below to implement a catch-all.&lt;br /&gt;
 14     # @example.com      example.com/catchall&lt;br /&gt;
 15     ...virtual mailboxes for more domains...&lt;br /&gt;
 16 &lt;br /&gt;
 17 /etc/postfix/virtual:&lt;br /&gt;
 18     postmaster@example.com postmaster&lt;br /&gt;
&lt;br /&gt;
'''Notes:'''&lt;br /&gt;
&lt;br /&gt;
* Line 2: The virtual_mailbox_domains setting tells Postfix that example.com is a so-called virtual mailbox domain. If you omit this setting then Postfix will reject mail (relay access denied) or will not be able to deliver it (mail for example.com loops back to myself).&lt;br /&gt;
&lt;br /&gt;
''NEVER list a virtual MAILBOX domain name as a mydestination domain!''&lt;br /&gt;
&lt;br /&gt;
''NEVER list a virtual MAILBOX domain name as a virtual ALIAS domain!''&lt;br /&gt;
&lt;br /&gt;
* Line 3: The virtual_mailbox_base parameter specifies a prefix for all virtual mailbox pathnames. This is a safety mechanism in case someone makes a mistake. It prevents mail from being delivered all over the file system.&lt;br /&gt;
&lt;br /&gt;
* Lines 4, 10-15: The virtual_mailbox_maps parameter specifies the lookup table with mailbox (or maildir) pathnames, indexed by the virtual mail address. In this example, mail for info@example.com goes to the mailbox at /var/mail/vhosts/example.com/info while mail for sales@example.com goes to the maildir located at /var/mail/vhosts/example.com/sales/.&lt;br /&gt;
&lt;br /&gt;
* Line 5: The virtual_minimum_uid specifies a lower bound on the mailbox or maildir owner's UID. This is a safety mechanism in case someone makes a mistake. It prevents mail from being written to sensitive files.&lt;br /&gt;
&lt;br /&gt;
* Lines 6, 7: The virtual_uid_maps and virtual_gid_maps parameters specify that all the virtual mailboxes are owned by a fixed uid and gid 5000. If this is not what you want, specify lookup tables that are searched by the recipient's mail address.&lt;br /&gt;
&lt;br /&gt;
* Line 14: The commented out entry (text after #) shows how one would implement a catch-all virtual mailbox address. Be prepared to receive a lot of spam, as well as bounced spam that was sent in the name of anything@example.com.&lt;br /&gt;
&lt;br /&gt;
''NEVER put a virtual MAILBOX wild-card in the virtual ALIAS file!!''&lt;br /&gt;
&lt;br /&gt;
* Lines 8, 17, 18: As you see, it is possible to mix virtual aliases with virtual mailboxes. We use this feature to redirect mail for example.com's postmaster address to the local postmaster. You can use the same mechanism to redirect an address to a remote address.&lt;br /&gt;
&lt;br /&gt;
* Line 18: This example assumes that in main.cf, $myorigin is listed under the mydestination parameter setting. If that is not the case, specify an explicit domain name on the right-hand side of the virtual alias table entries or else mail will go to the wrong domain.&lt;br /&gt;
&lt;br /&gt;
Execute the command &amp;quot;postmap /etc/postfix/virtual&amp;quot; after changing the virtual file, execute &amp;quot;postmap /etc/postfix/vmailbox&amp;quot; after changing the vmailbox file, and execute the command &amp;quot;postfix reload&amp;quot; after changing the main.cf file.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' mail delivery happens with the recipient's UID/GID privileges specified with virtual_uid_maps and virtual_gid_maps. Postfix 2.0 and earlier will not create mailDIRs in world-writable parent directories; you must create them in advance before you can use them. Postfix may be able to create mailBOX files by itself, depending on parent directory write permissions, but it is safer to create mailBOX files ahead of time.&lt;br /&gt;
&lt;br /&gt;
More details about the virtual mailbox delivery agent are given in the virtual(8) manual page.&lt;br /&gt;
&lt;br /&gt;
[[Category:Postfix]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Postfix&amp;diff=38632</id>
		<title>Postfix</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Postfix&amp;diff=38632"/>
		<updated>2008-05-02T19:57:17Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: /* External links */ new cat Postfix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''Postfix''' [[MTA]] is a [[sendmail]] alternative created by [[Wietse Venema]] that is designed to be faster, much easier to administer and more secure than sendmail. It is said that in achieving these design goals, it is less flexible than sendmail. Postfix generally works without much input by the system administrator and can drop right in and transparently replace a sendmail installation.&lt;br /&gt;
&lt;br /&gt;
== How to get it ==&lt;br /&gt;
&lt;br /&gt;
Install Postfix as described at [[Installing Software]]. If you need a modified Postfix, [[download]] the [[source code]], then [[compile]], link and [[install]] it. For downloading, visit http://www.postfix.org. [[Building]] is described at [[Compilation from source]].&lt;br /&gt;
&lt;br /&gt;
==How to use it==&lt;br /&gt;
To see if your [[Postfix]] is configured properly, send yourself a mail:&lt;br /&gt;
 $ sendmail -t ''me@home.org''&lt;br /&gt;
 FROM:me@server.org&lt;br /&gt;
 TO:''me@home.org''&lt;br /&gt;
 SUBJECT:test&lt;br /&gt;
 this is a sendmail test&lt;br /&gt;
Stop your input by typing CTRL_D. In this case, ''me@home.org'' is your e-mail-address.&lt;br /&gt;
&lt;br /&gt;
==Avoiding [[SPAM]] attacks==&lt;br /&gt;
You can detect if your [[server]] is used as a [[spam]]bot:&lt;br /&gt;
* send yourself a [[mail]]&lt;br /&gt;
* see which log file contains the information about sent mail:&lt;br /&gt;
 [[ls]] -ltr /var/log&lt;br /&gt;
:you might see a file named ''mail.info''. ''mail.info'' is used in this example.&lt;br /&gt;
* read your log file and see if other people use your [[mail server]] to send mail:&lt;br /&gt;
 [[cat]] /var/log/mail.info [[piping||]] [[grep]] relay=&lt;br /&gt;
&lt;br /&gt;
==How to configure it==&lt;br /&gt;
&lt;br /&gt;
=== Deliver all mail to [[procmail]] ===&lt;br /&gt;
&lt;br /&gt;
To make your [[postfix]] [[MTA]] deliver all mail to [[procmail]] for further processing,&lt;br /&gt;
* make sure procmail is installed&lt;br /&gt;
* enter in /etc/postfix/main.cf a line like:&lt;br /&gt;
 mailbox_command = /usr/bin/procmail&lt;br /&gt;
* restart your postfix&lt;br /&gt;
 /etc/init.d/postfix restart&lt;br /&gt;
&lt;br /&gt;
===Catch-all e-Mail addresses===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a domain ''example.org'' and want all mails for this domain in a mailbox, so, no more &amp;quot;user does not exist&amp;quot; replies to senders. Then you configure a catch-all for this domain.&lt;br /&gt;
&lt;br /&gt;
Go to [[webmin]]-&amp;gt;[[server]]s-&amp;gt;[[postfix]]-&amp;gt;virtual domain &lt;br /&gt;
Enter a Domain mapping lookup table. Click on &amp;quot;new&amp;quot; and map, e.g. ''example.org'' to ''exampleuser''.&lt;br /&gt;
&lt;br /&gt;
===Allow sending from a [[MUA]]===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a [[mail server]] running [[postfix]] and you want to use it in a [[MUA]] (e.g. [[kmail]]) as [[smtp]] [[server]]. This will most likely fail with an error message like&lt;br /&gt;
 Relay access denied&lt;br /&gt;
And you will have no chance to authenticate. To change this, add&lt;br /&gt;
 smtpd_sasl_auth_enable=yes&lt;br /&gt;
to /etc/postfix/main.cf, and [[outcomment]] all lines starting with tlsmgr in /etc/postfix/master.conf.&lt;br /&gt;
&lt;br /&gt;
==Working with the Mail Queue==&lt;br /&gt;
The outgoing mail queue is often stuck, so here's how you deal with that:&lt;br /&gt;
&lt;br /&gt;
To watch your outgoing mail queue, use the [[command]]&lt;br /&gt;
 mailq&lt;br /&gt;
&lt;br /&gt;
To read your outgoing mail queue, use [[webmin]] which has an own module for [[Postfix]].&lt;br /&gt;
&lt;br /&gt;
To flush your mail queue, use&lt;br /&gt;
 postqueue -f&lt;br /&gt;
&lt;br /&gt;
To delete a mail from your mail queue, find out its ''mail-id'' by running &lt;br /&gt;
 mailq&lt;br /&gt;
then delete the mail by running&lt;br /&gt;
 postsuper -d ''mail-id''&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[mail]]&lt;br /&gt;
* [[smtp]]&lt;br /&gt;
* [[qmail]]&lt;br /&gt;
* [[mailq]]&lt;br /&gt;
* [[Postfix Virtual Domain Hosting]]&lt;br /&gt;
* [[postfix with clamav-milter]]&lt;br /&gt;
* [[sendmail]]&lt;br /&gt;
* [[fetchmail]]&lt;br /&gt;
* [[procmail]]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.postfix.org/ Postfix homepage] (''www.postfix.org'')&lt;br /&gt;
&lt;br /&gt;
[[Category:Mail]]&lt;br /&gt;
[[Category:Postfix]]&lt;br /&gt;
[[Category:Mail Transfer Agents]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=User:MattHucke&amp;diff=38631</id>
		<title>User:MattHucke</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=User:MattHucke&amp;diff=38631"/>
		<updated>2008-05-02T19:49:37Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: +art&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I joined this site in May 2008.  I've been running Linux at home since approximately 1995 on my primary desktop machine.  For web and mail servers, I've generally preferred [[FreeBSD]], but now now switched to Linux thanks to ease of setting up virtual machines at such places as [http://www.linode.com Linode], my current hosting provider.&lt;br /&gt;
&lt;br /&gt;
I am the author of the [http://www.baldrickframework.org Baldrick Application Framework], an open source Perl library for web applications.&lt;br /&gt;
&lt;br /&gt;
==Articles I have created==&lt;br /&gt;
* [[:Category:Mail Transfer Agents]]&lt;br /&gt;
* [[nullmailer]]&lt;br /&gt;
* [[shell prompt]]&lt;br /&gt;
* [[bash prompt]] - split off from [[bash]]&lt;br /&gt;
* [[xterm title]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Xterm&amp;diff=38630</id>
		<title>Xterm</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Xterm&amp;diff=38630"/>
		<updated>2008-05-02T19:48:15Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: xterm title link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''xterm''' is the name of the [[X11]] standard [[terminal emulator]]. It is the ''de facto'' method of getting an interface to the [[command line]] when using X.  &lt;br /&gt;
&lt;br /&gt;
xterm is not solely a simple interface with the command line - it is in fact a terminal emulator, emulating the standard DEC VT102/VT220 and Tektronix 4014-compatible computer terminals.&lt;br /&gt;
&lt;br /&gt;
See [[xterm title]] for instructions on setting custom titles from a shell prompt.&lt;br /&gt;
&lt;br /&gt;
For other xterm-like programs see [[terminal emulators]].&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Xterm_title&amp;diff=38629</id>
		<title>Xterm title</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Xterm_title&amp;diff=38629"/>
		<updated>2008-05-02T19:47:37Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: new&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The window title of [[xterm]] and related programs -- such as [[gnome-terminal]] -- may be set through use of [[ANSI escape sequences]].&lt;br /&gt;
&lt;br /&gt;
Anything printed to the screen that is preceded by ESC]2; and followed by CTRL-G will become the xterm title.&lt;br /&gt;
&lt;br /&gt;
== In the shell ==&lt;br /&gt;
This shell function allows for a convenient method to set the title:&lt;br /&gt;
&lt;br /&gt;
  settitle() {&lt;br /&gt;
      # ^[ is actually ESC, produced by typing (in [[vi]]) control-V ESC&lt;br /&gt;
      # ^G is actually CTRL-G, produced by typing (in [[vi]]) control-V control-G&lt;br /&gt;
      echo &amp;quot;^[]2;$*^G&amp;quot; &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Once defined (in [[.profile]] etc), this shell function may be used to set the title to anything desired.  It is often used in the '''PROMPT_COMMAND''' variable (see [[shell prompt]]) to set the current directory, hostname, or other information as the xterm title.&lt;br /&gt;
One example (in this author's .profile:) &lt;br /&gt;
&lt;br /&gt;
    TTY=`tty`      &lt;br /&gt;
    XTERM_TITLE=&amp;quot;`hostname -s` : `basename $TTY` ($LOGNAME) &amp;quot;&lt;br /&gt;
    settitle &amp;quot;$XTERM_TITLE&amp;quot;&lt;br /&gt;
    PROMPT_COMMAND='settitle &amp;quot;$XTERM_TITLE&amp;quot;'&lt;br /&gt;
&lt;br /&gt;
...which gives a title resembling &amp;quot;nyarlathotep : ttyp4 (matt)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== In vim == &lt;br /&gt;
&lt;br /&gt;
The [[vim]] editor can set the xterm title to include the filename and directory of each file you edit.&lt;br /&gt;
&lt;br /&gt;
In your ~/.vimrc put:&lt;br /&gt;
&lt;br /&gt;
set title&lt;br /&gt;
&lt;br /&gt;
...which will cause vim to set the title according to its own predefined format string.&lt;br /&gt;
Upon exit, vim will change the title to &amp;quot;Thanks for flying VIM!&amp;quot;, as it has no way to know what the title was before you entered; but if you fix the title in your PROMPT_COMMAND it will immediately revert to your preferred title syntax.&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Bash_prompt&amp;diff=38628</id>
		<title>Bash prompt</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Bash_prompt&amp;diff=38628"/>
		<updated>2008-05-02T19:32:54Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: format fixes, xterm title link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes how to set the [[shell prompt]] within the [[bash]] shell, and offers several alternatives.&lt;br /&gt;
&lt;br /&gt;
Briefly, the [[environment variable]] '''PS1''' stores the string that is printed as the prompt, and the variable '''PROMPT_COMMAND''' stores an optional command that is executed immediately before the prompt is displayed.&lt;br /&gt;
&lt;br /&gt;
== PS1 ==&lt;br /&gt;
The PS1 variable stores the command-line prompt that &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt; prints.  Various backslash-codes within the PS1 string are evaluated each time the prompt is printed, allowing it to include information about the current environment, directory, username, etc.&lt;br /&gt;
&lt;br /&gt;
=== Simple prompts ===&lt;br /&gt;
 export PS1='\u@\h:\w\$ '         # Single quotes with single backslashes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
results in: &lt;br /&gt;
 matt@nyarlathotep:/var/home/matt$&lt;br /&gt;
&lt;br /&gt;
=== Colourful prompts ===&lt;br /&gt;
For a colourful bash prompt that looks like:&lt;br /&gt;
 &amp;lt;b&amp;gt;&amp;lt;font style=&amp;quot;color: #00b000;&amp;quot;&amp;gt;username@hostname/&amp;lt;/font&amp;gt;&amp;lt;font style=&amp;quot;color: #ff0000&amp;quot;&amp;gt;pwd&amp;lt;/font&amp;gt; &amp;lt;font style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;$&amp;lt;/font&amp;gt;&amp;lt;/B&amp;gt;&lt;br /&gt;
use the following:&lt;br /&gt;
 export PS1='\[\e[32m\]\u@\h/\[\e[1;31m\]\w\[\e[1;34m\]\$\[\e[0m\] '&lt;br /&gt;
&lt;br /&gt;
=== Multi-line prompts===&lt;br /&gt;
Prompts may also span multiple lines, which is useful when they incorporate the current directory name (which might be very large).&lt;br /&gt;
  export PS1='\[\033[01;36m\]\w\[\033[00m\]\n\[\033[01;32m\]\u@\h\[\033[00m\]\$ '&lt;br /&gt;
results in something like:&lt;br /&gt;
  '''&amp;lt;font style=&amp;quot;color: #0000b0&amp;quot;&amp;gt;/usr/local/apache2/build/httpd-2.2.4/build&amp;lt;/font&amp;gt;'''&lt;br /&gt;
  '''&amp;lt;font style=&amp;quot;color: #00b000&amp;quot;&amp;gt;matt@nyarlathotep&amp;lt;/font&amp;gt;$ ''' &lt;br /&gt;
&lt;br /&gt;
In this example, the very long directory name is on a line by itself - for ease of cut-and-paste - and the username and hostname follow, ending with the traditional '''$''' for a non-root user or '''#''' for root.&lt;br /&gt;
&lt;br /&gt;
=== PS1 syntax ===&lt;br /&gt;
&lt;br /&gt;
*\d Displays the [[date]] in &amp;quot;Weekday Month Date&amp;quot;.&lt;br /&gt;
*\e [[ASCII]] escape (See the [http://man.linuxquestions.org/index.php?query=console_codes&amp;amp;section=0&amp;amp;type=2 console_codes man page] for what you can do).&lt;br /&gt;
*\h Displays the [[hostname]] (up to the first '.').&lt;br /&gt;
*\t Displays current time in 24-hour HH:MM:SS format.&lt;br /&gt;
*\u Displays the name of your [[user]].&lt;br /&gt;
*\w Displays the name of the [[cwd|current directory]].&lt;br /&gt;
*\W Displays only the [[basename]] of the current directory.&lt;br /&gt;
*\$ Displays '$' if you're not [[root]], '#' if you are.&lt;br /&gt;
*\[ and \] Surround non-printing characters&lt;br /&gt;
&lt;br /&gt;
== PROMPT_COMMAND ==&lt;br /&gt;
&lt;br /&gt;
In addition, the PROMPT_COMMAND variable is run every time the shell prompt is printed.  Many use this to change the [[xterm title]] bar:&lt;br /&gt;
&lt;br /&gt;
  export PROMPT_COMMAND='echo -ne &amp;quot;\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007&amp;quot;'&lt;br /&gt;
&lt;br /&gt;
== Make it permanent ==&lt;br /&gt;
&lt;br /&gt;
If you restart your computer, you still want the same login prompt. That means, you must set $PS1 permanentely. You must set it specifically for the bash as well as other shells like [[zsh]], [[csh]] and [[ksh]]. You have to set it for [[logIn-shells]], and for non-login-shells. You can set it for all users or for a specific user. Here are the files you will need to set it in:&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
!&lt;br /&gt;
! for login-shells&lt;br /&gt;
! for non-login-shells&lt;br /&gt;
|-&lt;br /&gt;
| for all users&lt;br /&gt;
| /etc/profile&lt;br /&gt;
| /etc/bashrc&lt;br /&gt;
|-&lt;br /&gt;
| for a specific user&lt;br /&gt;
| ~/.bash_profile&lt;br /&gt;
| ~/.bashrc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Shell]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Bash_prompt&amp;diff=38627</id>
		<title>Bash prompt</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Bash_prompt&amp;diff=38627"/>
		<updated>2008-05-02T19:27:26Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: /* PS1 */ colourful multi-line example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes how to set the [[shell prompt]] within the [[bash]] shell, and offers several alternatives.&lt;br /&gt;
&lt;br /&gt;
Briefly, the [[environment variable]] '''PS1''' stores the string that is printed as the prompt, and the variable ''PROMPT_COMMAND'' stores an optional command that is executed immediately before the prompt is displayed.&lt;br /&gt;
&lt;br /&gt;
== PS1 ==&lt;br /&gt;
The PS1 variable stores the command-line prompt that &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt; prints.  Various backslash-codes within the PS1 string are evaluated each time the prompt is printed, allowing it to include information about the current environment, directory, username, etc.&lt;br /&gt;
&lt;br /&gt;
=== Simple prompts ===&lt;br /&gt;
 export PS1='\u@\h:\w\$ '         # Single quotes with single backslashes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
results in: &lt;br /&gt;
 matt@nyarlathotep:/var/home/matt$&lt;br /&gt;
&lt;br /&gt;
=== Colourful prompts ===&lt;br /&gt;
For a colourful bash prompt that looks like:&lt;br /&gt;
 &amp;lt;b&amp;gt;&amp;lt;font style=&amp;quot;color: #00b000;&amp;quot;&amp;gt;username@hostname/&amp;lt;/font&amp;gt;&amp;lt;font style=&amp;quot;color: #ff0000&amp;quot;&amp;gt;pwd&amp;lt;/font&amp;gt; &amp;lt;font style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;$&amp;lt;/font&amp;gt;&amp;lt;/B&amp;gt;&lt;br /&gt;
use the following:&lt;br /&gt;
 export PS1='\[\e[32m\]\u@\h/\[\e[1;31m\]\w\[\e[1;34m\]\$\[\e[0m\] '&lt;br /&gt;
&lt;br /&gt;
=== Multi-line prompts===&lt;br /&gt;
Prompts may also span multiple lines, which is useful when they incorporate the current directory name (which might be very large).&lt;br /&gt;
  export PS1='\[\033[01;36m\]\w\[\033[00m\]\n\[\033[01;32m\]\u@\h\[\033[00m\]\$ '&lt;br /&gt;
results in something like:&lt;br /&gt;
  '''&amp;lt;font style=&amp;quot;color: #0000b0&amp;quot;&amp;gt;/usr/local/apache2/build/httpd-2.2.4/build&amp;lt;/font&amp;gt;'''&lt;br /&gt;
  '''&amp;lt;font style=&amp;quot;color: #00b000&amp;quot;&amp;gt;matt@nyarlathotep&amp;lt;/font&amp;gt;$ ''' &lt;br /&gt;
&lt;br /&gt;
In this example, the very long directory name is on a line by itself - for ease of cut-and-paste - and the username and hostname follow, ending with the traditional '''$''' for a non-root user or '''#''' for root.&lt;br /&gt;
&lt;br /&gt;
=== PS1 syntax ===&lt;br /&gt;
&lt;br /&gt;
*\d Displays the [[date]] in &amp;quot;Weekday Month Date&amp;quot;.&lt;br /&gt;
*\e [[ASCII]] escape (See the [http://man.linuxquestions.org/index.php?query=console_codes&amp;amp;section=0&amp;amp;type=2 console_codes man page] for what you can do).&lt;br /&gt;
*\h Displays the [[hostname]] (up to the first '.').&lt;br /&gt;
*\t Displays current time in 24-hour HH:MM:SS format.&lt;br /&gt;
*\u Displays the name of your [[user]].&lt;br /&gt;
*\w Displays the name of the [[cwd|current directory]].&lt;br /&gt;
*\W Displays only the [[basename]] of the current directory.&lt;br /&gt;
*\$ Displays '$' if you're not [[root]], '#' if you are.&lt;br /&gt;
*\[ and \] Surround non-printing characters&lt;br /&gt;
&lt;br /&gt;
== PROMPT_COMMAND ==&lt;br /&gt;
&lt;br /&gt;
In addition, the PROMPT_COMMAND variable is run every time the shell prompt is printed.  Many use this to change the [[xterm]] title bar:&lt;br /&gt;
&lt;br /&gt;
: export PROMPT_COMMAND='echo -ne &amp;quot;\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007&amp;quot;'&lt;br /&gt;
&lt;br /&gt;
== Make it permanent ==&lt;br /&gt;
&lt;br /&gt;
If you restart your computer, you still want the same login prompt. That means, you must set $PS1 permanentely. You must set it specifically for the bash as well as other shells like [[zsh]], [[csh]] and [[ksh]]. You have to set it for [[logIn-shells]], and for non-login-shells. You can set it for all users or for a specific user. Here are the files you will need to set it in:&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
!&lt;br /&gt;
! for login-shells&lt;br /&gt;
! for non-login-shells&lt;br /&gt;
|-&lt;br /&gt;
| for all users&lt;br /&gt;
| /etc/profile&lt;br /&gt;
| /etc/bashrc&lt;br /&gt;
|-&lt;br /&gt;
| for a specific user&lt;br /&gt;
| ~/.bash_profile&lt;br /&gt;
| ~/.bashrc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Shell]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Command&amp;diff=38626</id>
		<title>Command</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Command&amp;diff=38626"/>
		<updated>2008-05-02T19:18:05Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: /* General notes on commands */ link shell prompt in examples&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
A '''command''', in the most general sense, is an executable file or a [[shell]] [[builtin]]. For example, &amp;lt;tt&amp;gt;[[cd]]&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;[[ls]]&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;[[echo]]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mozilla&amp;lt;/tt&amp;gt; are commands.&lt;br /&gt;
&lt;br /&gt;
Specifically for this section of the LQ Wiki, &amp;quot;commands&amp;quot; mean command line tools (or occasionally [[ncurses]] or other console utilities), rather than GUI tools which are covered in the [[Applications]] section.&lt;br /&gt;
&lt;br /&gt;
The commands are presented by two means of organization: an alphabetical list of '''All commands''' to enable quick access to a known command, and a group of categorical topics to enable quick access to the appropriate command for a particular purpose or area of interest.&lt;br /&gt;
&lt;br /&gt;
Additionally, there is a general usage section and sections on learning more.&lt;br /&gt;
&lt;br /&gt;
The list is extensive, but probably always incomplete, and always growing. Additions are needed, with the caution that they shouldn't be simple copies-and-pastes of the man pages. These are intended to be more tutorial, howto, and 'real world usage' oriented, and not intended to assume the extensive knowledge of UNIX and Linux which man pages frequently presuppose.&lt;br /&gt;
&lt;br /&gt;
'''''Note:''' details of commands vary from version to version and available commands vary from [[distribution]] to distribution.''&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Alphabetical list of commands==&lt;br /&gt;
*[[All Commands]]&lt;br /&gt;
&lt;br /&gt;
==Categorical lists of commands==&lt;br /&gt;
*[[File Commands]]&lt;br /&gt;
*[[Text Editors]]&lt;br /&gt;
*[[Text Viewing and Processing Tools]]&lt;br /&gt;
*[[Directory Commands]]&lt;br /&gt;
*[[User Commands]]&lt;br /&gt;
*[[Compressing files]]&lt;br /&gt;
*[[Uncompressing Files]]&lt;br /&gt;
*[[Cryptography Commands]]&lt;br /&gt;
*[[Disk and Tape Drive Commands]]&lt;br /&gt;
*[[Internet and Network Commands]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*[[Kernel Commands]]&lt;br /&gt;
*[[System Information]]&lt;br /&gt;
*[[Startup/Shutdown Commands]]&lt;br /&gt;
*[[Library-related Commands and Files]]&lt;br /&gt;
*[[Programming-related Commands]]&lt;br /&gt;
*[[Managing Sessions]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*[[Shells]]&lt;br /&gt;
*[[Scripting]]&lt;br /&gt;
&lt;br /&gt;
==General notes on commands==&lt;br /&gt;
Commands may be invoked as ''simple'' commands.  &lt;br /&gt;
''(In these examples, the '''$''' that starts each line is a [[shell prompt]] and not meant to be typed)''&lt;br /&gt;
&lt;br /&gt;
 $ ls&lt;br /&gt;
&lt;br /&gt;
Or they may be invoked as ''complex'' commands.&lt;br /&gt;
&lt;br /&gt;
 $ ls -l /bin&lt;br /&gt;
&lt;br /&gt;
Here &amp;quot;-l /bin&amp;quot; are a pair of '''arguments''' (separated from each other and the command by [[whitespace]]) and &amp;quot;-l&amp;quot; is specifically an '''option''', since it modifies the behavior of ls (it produces a '''l'''ong listing), while &amp;quot;/bin&amp;quot; simply specifies a target for &amp;lt;tt&amp;gt;ls&amp;lt;/tt&amp;gt; to act on.&lt;br /&gt;
&lt;br /&gt;
They may also be invoked in multiples where the semi-colon is a '''command separator'''.&lt;br /&gt;
&lt;br /&gt;
 $ cd /bin; ls&lt;br /&gt;
&lt;br /&gt;
That's two commands on one line. You may also execute one long command on two lines by escaping the carriage return with a backslash. (See [[shell script|scripting]] for further details on [[metacharacter]]s and escaping and quoting.)&lt;br /&gt;
&lt;br /&gt;
 $ cd really long command line \&lt;br /&gt;
 that we would like to finish here&lt;br /&gt;
&lt;br /&gt;
Another way to invoke multiple commands is conditionally, where (in [[bash]]) &amp;quot;&amp;amp;&amp;amp;&amp;quot; means to execute the second command only if the first returns with an exit code of 0 (i.e., it succeeds).&lt;br /&gt;
&lt;br /&gt;
 $ cd /bin &amp;amp;&amp;amp; ls&lt;br /&gt;
&lt;br /&gt;
With the semicolon command separator, had the change of directory failed, &amp;lt;tt&amp;gt;ls&amp;lt;/tt&amp;gt; would still have been invoked and simply listed the contents of the current directory. With the conditional operator, &amp;lt;tt&amp;gt;ls&amp;lt;/tt&amp;gt; would not be invoked if &amp;lt;tt&amp;gt;cd&amp;lt;/tt&amp;gt; had failed.&lt;br /&gt;
&lt;br /&gt;
Similarly, &amp;quot;||&amp;quot; means to execute the second command only if the first returns a non-zero exit code (i.e., it fails).&lt;br /&gt;
&lt;br /&gt;
 $ cd /bing [[Redirect |2&amp;gt;]]/dev/null || echo 'I kinna do it, Cap'\&amp;lt;nowiki&amp;gt;''&amp;lt;/nowiki&amp;gt;n!'&lt;br /&gt;
&lt;br /&gt;
This will &amp;lt;tt&amp;gt;cd&amp;lt;/tt&amp;gt; to the directory named &amp;quot;bing&amp;quot; if it in fact exists and the command will exit. Since it probably doesn't, being a typo, the second command will execute and print a somewhat more entertaining error message than is usual.&lt;br /&gt;
&lt;br /&gt;
==Learning about commands with local documentation==&lt;br /&gt;
&lt;br /&gt;
A Linux system should have [[documentation]] in the form of [[man pages]] and possibly [[GNU]] [[info]] pages (see also [[texinfo]]). In a manner similar to this page's alphabetical list, if you know the command you wish to learn more about,&lt;br /&gt;
&lt;br /&gt;
 $ man ''command''&lt;br /&gt;
&lt;br /&gt;
will show you the manual page of ''command''.&lt;br /&gt;
&lt;br /&gt;
If you do not know the command but would like to see commands relevant to a topic, use&lt;br /&gt;
&lt;br /&gt;
 $ [[apropos]] ''subject''&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 $ man -k ''subject''&lt;br /&gt;
&lt;br /&gt;
to find suitable commands.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, while most man pages will be informative and complete, many GNU utilities distribute very sketchy man pages whose primary purpose is to redirect the user to the info system. In that case,&lt;br /&gt;
&lt;br /&gt;
 $ info ''command''&lt;br /&gt;
&lt;br /&gt;
will invoke that system of documentation.&lt;br /&gt;
&lt;br /&gt;
Many commands have an &amp;quot;-h&amp;quot;, &amp;quot;-H&amp;quot;, &amp;quot;-help&amp;quot;, &amp;quot;--help&amp;quot; option or some combination thereof. Unfortunately, some commands understand other things by &amp;quot;-h&amp;quot; or &amp;quot;-H&amp;quot; so unexpected and possibly unpleasant results may occur.&lt;br /&gt;
&lt;br /&gt;
There are also extensive miscellaneous files usually found in /usr/doc, /usr/local/doc, /usr/src/linux/Documentation (kernel docs), and elsewhere.&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://www.debianadmin.com/basic-linux-commands-with-man-pages.html Complete List of Linux Commands With man pages] (''www.debianadmin.com'')&lt;br /&gt;
* [http://man.linuxquestions.org/ LQ Manual Pages] (''man.linuxquestions.org'')&lt;br /&gt;
* [http://www.phpman.info/ Online Unix/Linux Manual Page] (''www.phpman.info'')&lt;br /&gt;
* [http://man-wiki.net/ Linux Man Pages Online] (''man-wiki.net'')&lt;br /&gt;
* [http://www.debianhelp.co.uk/commands.htm Complete Basic Linux Commands List] (''www.debianhelp.co.uk'')&lt;br /&gt;
* [http://linuxgalore.com/new/tutorials/basic_linux_commands.html  Basic Linux Commands List] (''http://linuxgalore.com'')&lt;br /&gt;
* [http://linuxgalore.com/new/tutorials/linux_administration.html  List of configuration files in Linux] (''http://linuxgalore.com'')&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=PS1&amp;diff=38620</id>
		<title>PS1</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=PS1&amp;diff=38620"/>
		<updated>2008-05-02T19:02:21Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: redir&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Shell prompt]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=User:MattHucke&amp;diff=38619</id>
		<title>User:MattHucke</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=User:MattHucke&amp;diff=38619"/>
		<updated>2008-05-02T19:01:58Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: arts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I joined this site in May 2008.  I've been running Linux at home since approximately 1995 on my primary desktop machine.  For web and mail servers, I've generally preferred [[FreeBSD]], but now now switched to Linux thanks to ease of setting up virtual machines at such places as [http://www.linode.com Linode], my current hosting provider.&lt;br /&gt;
&lt;br /&gt;
I am the author of the [http://www.baldrickframework.org Baldrick Application Framework], an open source Perl library for web applications.&lt;br /&gt;
&lt;br /&gt;
==Articles I have created==&lt;br /&gt;
* [[:Category:Mail Transfer Agents]]&lt;br /&gt;
* [[nullmailer]]&lt;br /&gt;
* [[shell prompt]]&lt;br /&gt;
* [[bash prompt]] - split off from [[bash]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Shell_prompt&amp;diff=38618</id>
		<title>Shell prompt</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Shell_prompt&amp;diff=38618"/>
		<updated>2008-05-02T19:01:13Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: new&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A '''shell prompt''' is a prompt (a bit of text) printed by the [[shell]] to indicate it is ready to receive a shell command.&lt;br /&gt;
&lt;br /&gt;
The shell prompt is highly customizable, and is often set by [[.profile]] or equivalent files.&lt;br /&gt;
&lt;br /&gt;
==sh shells==&lt;br /&gt;
&lt;br /&gt;
In shells based upon /bin/sh, the shell prompt traditionally ends with '''$''' for ordinary users and '''#''' for root.  It is set by means of the PS1 variable.   A minimalist example:&lt;br /&gt;
&lt;br /&gt;
    export PS1=&amp;quot;$LOGNAME\$&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For detailed examples and syntax, see the articles for various implementations:&lt;br /&gt;
&lt;br /&gt;
* [[bash]] - see [[bash prompt]]&lt;br /&gt;
* [[zsh]]&lt;br /&gt;
* [[ksh]]&lt;br /&gt;
&lt;br /&gt;
==csh shells==&lt;br /&gt;
&lt;br /&gt;
For [[csh]] and related shells, the prompt is traditionally '''%''' for non-root users.&lt;br /&gt;
&lt;br /&gt;
    set prompt=&amp;quot;$user% &amp;quot;&lt;br /&gt;
&lt;br /&gt;
* [[csh]]&lt;br /&gt;
* [[tcsh]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Shell]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Bash_prompt&amp;diff=38612</id>
		<title>Bash prompt</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Bash_prompt&amp;diff=38612"/>
		<updated>2008-05-02T18:53:35Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: /* Simple prompts */ format fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes how to set the [[shell prompt]] within the [[bash]] shell, and offers several alternatives.&lt;br /&gt;
&lt;br /&gt;
Briefly, the [[environment variable]] '''PS1''' stores the string that is printed as the prompt, and the variable ''PROMPT_COMMAND'' stores an optional command that is executed immediately before the prompt is displayed.&lt;br /&gt;
&lt;br /&gt;
==PS1==&lt;br /&gt;
The PS1 variable stores the command-line prompt that &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt; prints.  Various backslash-codes within the PS1 string are evaluated each time the prompt is printed, allowing it to include information about the current environment, directory, username, etc.&lt;br /&gt;
&lt;br /&gt;
===Simple prompts===&lt;br /&gt;
; &amp;lt;nowiki&amp;gt;export PS1='\u@\h:\w\$ '         # Single quotes with single backslashes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: results in: '''fred@myhost:/var/home/fred$'''&lt;br /&gt;
&lt;br /&gt;
===Colourful prompts===&lt;br /&gt;
For a colourful bash prompt that looks like:&lt;br /&gt;
 &amp;lt;b&amp;gt;&amp;lt;font style=&amp;quot;color: #00d000;&amp;quot;&amp;gt;username@hostname/&amp;lt;/font&amp;gt;&amp;lt;font style=&amp;quot;color: #ff0000&amp;quot;&amp;gt;pwd&amp;lt;/font&amp;gt; &amp;lt;font style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;$&amp;lt;/font&amp;gt;&amp;lt;/B&amp;gt;&lt;br /&gt;
use the following:&lt;br /&gt;
 export PS1='\[\e[32m\]\u@\h/\[\e[1;31m\]\w\[\e[1;34m\]\$\[\e[0m\] '&lt;br /&gt;
&lt;br /&gt;
===PS1 syntax===&lt;br /&gt;
&lt;br /&gt;
*\d Displays the [[date]] in &amp;quot;Weekday Month Date&amp;quot;.&lt;br /&gt;
*\e [[ASCII]] escape (See the [http://man.linuxquestions.org/index.php?query=console_codes&amp;amp;section=0&amp;amp;type=2 console_codes man page] for what you can do).&lt;br /&gt;
*\h Displays the [[hostname]] (up to the first '.').&lt;br /&gt;
*\t Displays current time in 24-hour HH:MM:SS format.&lt;br /&gt;
*\u Displays the name of your [[user]].&lt;br /&gt;
*\w Displays the name of the [[cwd|current directory]].&lt;br /&gt;
*\W Displays only the [[basename]] of the current directory.&lt;br /&gt;
*\$ Displays '$' if you're not [[root]], '#' if you are.&lt;br /&gt;
*\[ and \] Surround non-printing characters&lt;br /&gt;
&lt;br /&gt;
==PROMPT_COMMAND==&lt;br /&gt;
&lt;br /&gt;
In addition, the PROMPT_COMMAND variable is run every time the shell prompt is printed.  Many use this to change the [[xterm]] title bar:&lt;br /&gt;
&lt;br /&gt;
: export PROMPT_COMMAND='echo -ne &amp;quot;\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007&amp;quot;'&lt;br /&gt;
&lt;br /&gt;
== Make it permanent ==&lt;br /&gt;
&lt;br /&gt;
If you restart your computer, you still want the same login prompt. That means, you must set $PS1 permanentely. You must set it specifically for the bash as well as other shells like [[zsh]], [[csh]] and [[ksh]]. You have to set it for [[logIn-shells]], and for non-login-shells. You can set it for all users or for a specific user. Here are the files you will need to set it in:&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
!&lt;br /&gt;
! for login-shells&lt;br /&gt;
! for non-login-shells&lt;br /&gt;
|-&lt;br /&gt;
| for all users&lt;br /&gt;
| /etc/profile&lt;br /&gt;
| /etc/bashrc&lt;br /&gt;
|-&lt;br /&gt;
| for a specific user&lt;br /&gt;
| ~/.bash_profile&lt;br /&gt;
| ~/.bashrc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Shell]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Bash_prompt&amp;diff=38611</id>
		<title>Bash prompt</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Bash_prompt&amp;diff=38611"/>
		<updated>2008-05-02T18:52:23Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: split off from Bash article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes how to set the [[shell prompt]] within the [[bash]] shell, and offers several alternatives.&lt;br /&gt;
&lt;br /&gt;
Briefly, the [[environment variable]] '''PS1''' stores the string that is printed as the prompt, and the variable ''PROMPT_COMMAND'' stores an optional command that is executed immediately before the prompt is displayed.&lt;br /&gt;
&lt;br /&gt;
==PS1==&lt;br /&gt;
The PS1 variable stores the command-line prompt that &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt; prints.  Various backslash-codes within the PS1 string are evaluated each time the prompt is printed, allowing it to include information about the current environment, directory, username, etc.&lt;br /&gt;
&lt;br /&gt;
===Simple prompts===&lt;br /&gt;
; export PS1='\u@\h:\w\$ '         # Single quotes with single backslashes&lt;br /&gt;
: results in: '''john@myhost:/var/home/john$'''&lt;br /&gt;
&lt;br /&gt;
===Colourful prompts===&lt;br /&gt;
For a colourful bash prompt that looks like:&lt;br /&gt;
 &amp;lt;b&amp;gt;&amp;lt;font style=&amp;quot;color: #00d000;&amp;quot;&amp;gt;username@hostname/&amp;lt;/font&amp;gt;&amp;lt;font style=&amp;quot;color: #ff0000&amp;quot;&amp;gt;pwd&amp;lt;/font&amp;gt; &amp;lt;font style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;$&amp;lt;/font&amp;gt;&amp;lt;/B&amp;gt;&lt;br /&gt;
use the following:&lt;br /&gt;
 export PS1='\[\e[32m\]\u@\h/\[\e[1;31m\]\w\[\e[1;34m\]\$\[\e[0m\] '&lt;br /&gt;
&lt;br /&gt;
===PS1 syntax===&lt;br /&gt;
&lt;br /&gt;
*\d Displays the [[date]] in &amp;quot;Weekday Month Date&amp;quot;.&lt;br /&gt;
*\e [[ASCII]] escape (See the [http://man.linuxquestions.org/index.php?query=console_codes&amp;amp;section=0&amp;amp;type=2 console_codes man page] for what you can do).&lt;br /&gt;
*\h Displays the [[hostname]] (up to the first '.').&lt;br /&gt;
*\t Displays current time in 24-hour HH:MM:SS format.&lt;br /&gt;
*\u Displays the name of your [[user]].&lt;br /&gt;
*\w Displays the name of the [[cwd|current directory]].&lt;br /&gt;
*\W Displays only the [[basename]] of the current directory.&lt;br /&gt;
*\$ Displays '$' if you're not [[root]], '#' if you are.&lt;br /&gt;
*\[ and \] Surround non-printing characters&lt;br /&gt;
&lt;br /&gt;
==PROMPT_COMMAND==&lt;br /&gt;
&lt;br /&gt;
In addition, the PROMPT_COMMAND variable is run every time the shell prompt is printed.  Many use this to change the [[xterm]] title bar:&lt;br /&gt;
&lt;br /&gt;
: export PROMPT_COMMAND='echo -ne &amp;quot;\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007&amp;quot;'&lt;br /&gt;
&lt;br /&gt;
== Make it permanent ==&lt;br /&gt;
&lt;br /&gt;
If you restart your computer, you still want the same login prompt. That means, you must set $PS1 permanentely. You must set it specifically for the bash as well as other shells like [[zsh]], [[csh]] and [[ksh]]. You have to set it for [[logIn-shells]], and for non-login-shells. You can set it for all users or for a specific user. Here are the files you will need to set it in:&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
!&lt;br /&gt;
! for login-shells&lt;br /&gt;
! for non-login-shells&lt;br /&gt;
|-&lt;br /&gt;
| for all users&lt;br /&gt;
| /etc/profile&lt;br /&gt;
| /etc/bashrc&lt;br /&gt;
|-&lt;br /&gt;
| for a specific user&lt;br /&gt;
| ~/.bash_profile&lt;br /&gt;
| ~/.bashrc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Shell]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Bash&amp;diff=38601</id>
		<title>Bash</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Bash&amp;diff=38601"/>
		<updated>2008-05-02T18:44:17Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: bash prompt as separate article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''bash''' (the '''b'''ourne-'''a'''gain '''sh'''ell) - is the default [[shell]] for Linux users.  It is compatible with the traditional Bourne shell ([[sh]]) in that Bourne shell scripts will work in bash, though there are some bash-specific features that will not work on older Bourne shells.&lt;br /&gt;
&lt;br /&gt;
== Shell initialization ==&lt;br /&gt;
&lt;br /&gt;
The place to put [[alias]]es and simple [[environment variable]] settings that you want every time you open a shell is in &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt; in your home directory.  Example &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt; file:&lt;br /&gt;
 if [ -f /etc/bashrc ]; then . /etc/bashrc ; fi # Load system-wide bashrc&lt;br /&gt;
 export PAGER=less&lt;br /&gt;
 alias md='mkdir'&lt;br /&gt;
 alias rd='rmdir'&lt;br /&gt;
 alias ll='ls -lh'&lt;br /&gt;
 alias la='ls -lah'&lt;br /&gt;
 alias df='df -h'&lt;br /&gt;
 alias du='du -h'&lt;br /&gt;
 alias du1='du --max-depth=1'&lt;br /&gt;
 alias ping='ping -c 5'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Appending text to environment variables like your [[PATH]] should not be done in the &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;, because it gets run often when subshells are started.  Place lines like this in your &amp;lt;tt&amp;gt;~/.bash_profile&amp;lt;/tt&amp;gt;:&lt;br /&gt;
 PATH=$HOME/bin:$PATH  # Adds to path, only in .bash_profile&lt;br /&gt;
&lt;br /&gt;
When started as a login shell, bash first reads &amp;lt;tt&amp;gt;/etc/profile&amp;lt;/tt&amp;gt;, then the first of &amp;lt;tt&amp;gt;~/.bash_profile&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;~/.bash_login&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;~/.profile&amp;lt;/tt&amp;gt; that it finds.  It doesn't automatically read the  &amp;lt;tt&amp;gt;~/.bashrc&amp;lt;/tt&amp;gt; file in login shells.  For consistency, the following line shold probably be in your &amp;lt;tt&amp;gt;.bash_profile&amp;lt;/tt&amp;gt;:&lt;br /&gt;
 if [ -f ~/.bashrc ]; then . ~/.bashrc ; fi&lt;br /&gt;
&lt;br /&gt;
== Bash-specific features ==&lt;br /&gt;
&lt;br /&gt;
=== User features ===&lt;br /&gt;
&lt;br /&gt;
* [[Tab filename completion]] - Type the beginning of a [[command]], variable, or [[file]], press TAB, and bash will attempt to fill in the rest.&lt;br /&gt;
&lt;br /&gt;
* Typing &amp;lt;Esc&amp;gt;. repeats the last argument of the previous command.&lt;br /&gt;
&lt;br /&gt;
* Typing &amp;lt;Esc&amp;gt;&amp;lt;BackSpace&amp;gt; backspaces a whole &amp;quot;word&amp;quot; at a time.&lt;br /&gt;
&lt;br /&gt;
* Readline - a [[GNU]]-created [[library]] for line-by-line text input.  It allows a searchable command history and easy editing of the current command line, among other things.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;ctrl&amp;gt; + &amp;lt;r&amp;gt; invokes reverse-i-search for the [[command]] buffer (history of what you've typed). Then just type a part, any part, not necessarily from the begining, of a command you've typed in before and it'll give you the chronologically closest match&lt;br /&gt;
&lt;br /&gt;
See [[Control keys]] for a list of control keys and which part of the system (the shell or the terminal) is responsible for it.&lt;br /&gt;
&lt;br /&gt;
=== Language features ===&lt;br /&gt;
* The use of &amp;lt;tt&amp;gt;$( command )&amp;lt;/tt&amp;gt; for command substitution (backquotes are traditional)&lt;br /&gt;
&lt;br /&gt;
* Numerical for loops&lt;br /&gt;
     for (( i=0; i&amp;lt;10; i++ )) ; do echo $i ; done&lt;br /&gt;
&lt;br /&gt;
* Substitution in variable expansions (not [[regex]])&lt;br /&gt;
     TEXT=&amp;quot;I like dogs.&amp;quot;&lt;br /&gt;
     echo ${TEXT/dogs/bats}   # Prints:   I like bats.&lt;br /&gt;
&lt;br /&gt;
Be sure to check out the [http://www.tldp.org/LDP/abs/html Advanced Bash Scripting Guide], which has (most of) the info you need to start with bash scripting.&lt;br /&gt;
&lt;br /&gt;
=== Custom Prompt ===&lt;br /&gt;
&lt;br /&gt;
==== Set it ====&lt;br /&gt;
&lt;br /&gt;
The PS1 variable stores the command-line prompt that &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt; prints.  For a colorful bash prompt that looks like:&lt;br /&gt;
 &amp;lt;b&amp;gt;&amp;lt;font style=&amp;quot;color: #00d000;&amp;quot;&amp;gt;username@hostname/&amp;lt;/font&amp;gt;&amp;lt;font style=&amp;quot;color: #ff0000&amp;quot;&amp;gt;pwd&amp;lt;/font&amp;gt; &amp;lt;font style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;$&amp;lt;/font&amp;gt;&amp;lt;/B&amp;gt;&lt;br /&gt;
use the following:&lt;br /&gt;
 export PS1='\[\e[32m\]\u@\h/\[\e[1;31m\]\w\[\e[1;34m\]\$\[\e[0m\] '&lt;br /&gt;
&lt;br /&gt;
For one without colors:&lt;br /&gt;
 &amp;lt;B&amp;gt;username@hostname:pwd$&amp;lt;/B&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 export PS1='\u@\h:\w\$ '         # Single quotes with single backslashes&lt;br /&gt;
&lt;br /&gt;
''For more examples and options, see [[bash prompt]].''&lt;br /&gt;
&lt;br /&gt;
==== Make it permanent ====&lt;br /&gt;
&lt;br /&gt;
If you restart your computer, you still want the same login prompt. That means, you must set $PS1 permanentely. You must set it specifically for the bash as well as other shells like [[zsh]], [[csh]] and [[ksh]]. You have to set it for [[logIn-shells]], and for non-login-shells. You can set it for all users or for a specific user. Here are the files you will need to set it in:&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
!&lt;br /&gt;
! for login-shells&lt;br /&gt;
! for non-login-shells&lt;br /&gt;
|-&lt;br /&gt;
| for all users&lt;br /&gt;
| /etc/profile&lt;br /&gt;
| /etc/bashrc&lt;br /&gt;
|-&lt;br /&gt;
| for a specific user&lt;br /&gt;
| ~/.bash_profile&lt;br /&gt;
| ~/.bashrc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Programming#Scripting languages|Scripting languages section]]&lt;br /&gt;
* [[Bash tips]]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
* [http://man.linuxquestions.org/index.php?query=bash&amp;amp;section=0&amp;amp;type=2 bash man page] (''man.linuxquestions.org'')&lt;br /&gt;
* [http://www.linuxcommand.org/ LinuxCommand tutorials] (''www.linuxcommand.org'')&lt;br /&gt;
* [http://blog.webhosting.uk.com/2007/04/08/using-bash-shell-shortcuts/ Bash Shortcuts] (''www.webhosting.uk.com'')&lt;br /&gt;
* [http://www-106.ibm.com/developerworks/linux/library/l-tip-prompt/ Prompt magic] (''www-106.ibm.com'')&lt;br /&gt;
* [http://www.tldp.org/LDP/Bash-Beginners-Guide/html/index.html Bash Guide for Beginners] (''www.tldp.org'')&lt;br /&gt;
* [http://www.tldp.org/LDP/abs/html Advanced Bash Scripting Guide] (''www.tldp.org'')&lt;br /&gt;
* [http://www.cyberciti.biz/nixcraft/vivek/blogger/2006/02/how-linux-or-unix-understand-which.php  nixCraft: How Linux or UNIX Understand which program to run] (''www.cyberciti.biz'')&lt;br /&gt;
*: in detail: how Bash resolves a command&lt;br /&gt;
&lt;br /&gt;
[[Category:Shell]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=LQWiki_talk:Ways_to_help_the_LinuxQuestions.org_Wiki&amp;diff=38594</id>
		<title>LQWiki talk:Ways to help the LinuxQuestions.org Wiki</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=LQWiki_talk:Ways_to_help_the_LinuxQuestions.org_Wiki&amp;diff=38594"/>
		<updated>2008-05-02T16:58:14Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: no more mailing list?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There's a typo in this article, last words: 'maling list'. So if anybody reads this that has write access to this page... :) --[[User:Jor|Jor]] 11:21, Jan 3, 2005 (EST)&lt;br /&gt;
:Thanks Jor ;) --[[User:Skyline|Skyline]] 16:14, Jan 3, 2005 (EST)&lt;br /&gt;
&lt;br /&gt;
== no more mailing list? ==&lt;br /&gt;
&lt;br /&gt;
the page posted to by the mailing list link states that there is no such list.&lt;br /&gt;
&lt;br /&gt;
Has the mailing list been moved elsewhere?  I'm a new user (with wiki experience elsewhere) who is eager to get involved.  Do we still have a mailing list?  Or some other sort of forum for discussing wiki strategy?  [[User:MattHucke|MattHucke]] 12:58, May 2, 2008 (EDT)&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=UserMode_linux&amp;diff=38593</id>
		<title>UserMode linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=UserMode_linux&amp;diff=38593"/>
		<updated>2008-05-02T16:31:26Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: broken redir&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[User-mode Linux]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Nullmailer&amp;diff=38592</id>
		<title>Nullmailer</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Nullmailer&amp;diff=38592"/>
		<updated>2008-05-02T16:22:12Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: better install, don't need wrapper shell script&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''nullmailer''' is, according to its own [[man]] page,  &amp;quot;a simple and secure relay-only mail transport agent.&amp;quot;  It was written by Bruce Guenter.&lt;br /&gt;
&lt;br /&gt;
Nullmailer may be found at http://www.untroubled.org/nullmailer/.  At present, the current release is 1.04, dated 2007-10-09.&lt;br /&gt;
&lt;br /&gt;
nullmailer is an appropriate choice of mail agent for machines that receive no local mail, and only need to generate messages for sending off the system, such as a web server with applications that occasionally send notifications.  nullmailer is easy to install and requires little ongoing administration.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Obtain the source archive and unpack.&lt;br /&gt;
&lt;br /&gt;
Create a user &amp;quot;nullmailer&amp;quot; and a group &amp;quot;nullmailer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the source tree:&lt;br /&gt;
  ./configure&lt;br /&gt;
  make&lt;br /&gt;
  make install install-root&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
nullmailer's config files may be found in /usr/local/etc/nullmailer/.&lt;br /&gt;
&lt;br /&gt;
In the file &amp;quot;me&amp;quot;, put your machine's hostname:&lt;br /&gt;
&lt;br /&gt;
  foo.example.org&lt;br /&gt;
&lt;br /&gt;
In the file &amp;quot;remotes&amp;quot;, list those servers through which all mail should be relayed, along with the protocol:&lt;br /&gt;
&lt;br /&gt;
  mailserv.example.org smtp&lt;br /&gt;
  mailserv2.example.org smtp&lt;br /&gt;
  mailserv3.foo.org smtp&lt;br /&gt;
&lt;br /&gt;
On these remote machines, with their more traditional mail agents, don't forget to allow the nullmailer-using machine to relay.&lt;br /&gt;
For example, in [[Postfix]], you would list IP numbers of the machine(s) using nullmailer in &amp;quot;mynetworks&amp;quot; of &amp;quot;main.cf&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Running the daemon==&lt;br /&gt;
Like any other MTA, nullmailer runs as a daemon, which manages the queue and sends mail on its way.  Start the daemon from your RC files:&lt;br /&gt;
&lt;br /&gt;
;/etc/rc.local:&lt;br /&gt;
:/usr/local/sbin/nullmailer-send &amp;amp;amp;  ## ampersand required to force it to go background&lt;br /&gt;
&lt;br /&gt;
==Sending mail==&lt;br /&gt;
&amp;quot;nullmailer-inject&amp;quot; receives a standard email message on STDIN which it then writes to the queue (a pipe, and several directories under /usr/local/var/nullmailer/).&lt;br /&gt;
&lt;br /&gt;
To be effective, nullmailer-inject should masquerade as sendmail, for benefit of the many scripts that reference /usr/sbin/sendmail.  &lt;br /&gt;
&lt;br /&gt;
nullmailer-inject's command-line arguments are not compatible with sendmail; however, the author has provided a wrapper, installed as /usr/local/sbin/sendmail.  (&amp;quot;strings /usr/local/bin/sendmail |grep nullmail&amp;quot; can be used to verify that this file is indeed part of nullmailer).&lt;br /&gt;
&lt;br /&gt;
To invoke this, you'll need to link it from the standard location.&lt;br /&gt;
&lt;br /&gt;
/usr/sbin/sendmail is usually a link to something like /etc/alternatives/mta.  If this is the case:&lt;br /&gt;
&lt;br /&gt;
  cd /etc/alternatives&lt;br /&gt;
  rm mta mta-sendmail&lt;br /&gt;
  ln -s /usr/local/sbin/sendmail mta&lt;br /&gt;
  ln -s /usr/local/sbin/sendmail mta-sendmail&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Mail]]&lt;br /&gt;
[[Category:Mail Transfer Agents]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=User:MattHucke&amp;diff=38591</id>
		<title>User:MattHucke</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=User:MattHucke&amp;diff=38591"/>
		<updated>2008-05-02T16:09:04Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: cat&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I joined this site in May 2008.  I've been running Linux at home since approximately 1995 on my primary desktop machine.  For web and mail servers, I've generally preferred [[FreeBSD]], but now now switched to Linux thanks to ease of setting up virtual machines at such places as [http://www.linode.com Linode], my current hosting provider.&lt;br /&gt;
&lt;br /&gt;
I am the author of the [http://www.baldrickframework.org Baldrick Application Framework], an open source Perl library for web applications.&lt;br /&gt;
&lt;br /&gt;
==Articles I have created==&lt;br /&gt;
* [[:Category:Mail Transfer Agents]]&lt;br /&gt;
* [[nullmailer]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=User:MattHucke&amp;diff=38590</id>
		<title>User:MattHucke</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=User:MattHucke&amp;diff=38590"/>
		<updated>2008-05-02T16:08:49Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: cat&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I joined this site in May 2008.  I've been running Linux at home since approximately 1995 on my primary desktop machine.  For web and mail servers, I've generally preferred [[FreeBSD]], but now now switched to Linux thanks to ease of setting up virtual machines at such places as [http://www.linode.com Linode], my current hosting provider.&lt;br /&gt;
&lt;br /&gt;
I am the author of the [http://www.baldrickframework.org Baldrick Application Framework], an open source Perl library for web applications.&lt;br /&gt;
&lt;br /&gt;
==Articles I have created==&lt;br /&gt;
* [[:Category:Mail transfer agents]]&lt;br /&gt;
* [[nullmailer]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Sendmail&amp;diff=38589</id>
		<title>Sendmail</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Sendmail&amp;diff=38589"/>
		<updated>2008-05-02T16:06:24Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: cat&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Sendmail''' is the name of a venerable [[MTA]] (or Mail Transfer Agent) still used today on the [[Internet]] at large.  It is renowned for its arcane configuration files and history of security holes, although modern sendmail has taken great pains to overcome this reputation.&lt;br /&gt;
&lt;br /&gt;
Sendmail understands the [[SMTP]] protocol, and others; it does not support reading mail (as a [[POP3]] or [[IMAP]] server does).  Many enhancements to sendmail exist, for such things as anti-virus scanning in real time, anti-spam blacklist checking, and organization-wide mail routing.  Most of these are implemented though the mail filter [[milter]].&lt;br /&gt;
&lt;br /&gt;
All [[Linux]] systems typically come with sendmail, or a compatible program, and the major [[Unix]] MTAs such as [[qmail]] and [[postfix]] come with binaries that do &amp;quot;sendmail emulation&amp;quot;, allowing them to function as drop-in replacements for sendmail.&lt;br /&gt;
&lt;br /&gt;
==Sendmail Lock==&lt;br /&gt;
If you have trouble because, on bootup, linux hangs for a couple minutes while loading sendmail, see the section on fixing the [[Sendmail Lock]].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[mailq]] - watch your outgoing mail queue&lt;br /&gt;
* [http://www.sendmail.org/ Sendmail homepage]&lt;br /&gt;
&lt;br /&gt;
[[Category:Mail]]&lt;br /&gt;
[[Category:Command]]&lt;br /&gt;
[[Category:Daemon]]&lt;br /&gt;
[[Category:Mail Transfer Agents]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Postfix&amp;diff=38587</id>
		<title>Postfix</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Postfix&amp;diff=38587"/>
		<updated>2008-05-02T16:04:26Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: cat&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''Postfix''' [[MTA]] is a [[sendmail]] alternative created by [[Wietse Venema]] that is designed to be faster, much easier to administer and more secure than sendmail. It is said that in achieving these design goals, it is less flexible than sendmail. Postfix generally works without much input by the system administrator and can drop right in and transparently replace a sendmail installation.&lt;br /&gt;
&lt;br /&gt;
== How to get it ==&lt;br /&gt;
&lt;br /&gt;
Install Postfix as described at [[Installing Software]]. If you need a modified Postfix, [[download]] the [[source code]], then [[compile]], link and [[install]] it. For downloading, visit http://www.postfix.org. [[Building]] is described at [[Compilation from source]].&lt;br /&gt;
&lt;br /&gt;
==How to use it==&lt;br /&gt;
To see if your [[Postfix]] is configured properly, send yourself a mail:&lt;br /&gt;
 $ sendmail -t ''me@home.org''&lt;br /&gt;
 FROM:me@server.org&lt;br /&gt;
 TO:''me@home.org''&lt;br /&gt;
 SUBJECT:test&lt;br /&gt;
 this is a sendmail test&lt;br /&gt;
Stop your input by typing CTRL_D. In this case, ''me@home.org'' is your e-mail-address.&lt;br /&gt;
&lt;br /&gt;
==Avoiding [[SPAM]] attacks==&lt;br /&gt;
You can detect if your [[server]] is used as a [[spam]]bot:&lt;br /&gt;
* send yourself a [[mail]]&lt;br /&gt;
* see which log file contains the information about sent mail:&lt;br /&gt;
 [[ls]] -ltr /var/log&lt;br /&gt;
:you might see a file named ''mail.info''. ''mail.info'' is used in this example.&lt;br /&gt;
* read your log file and see if other people use your [[mail server]] to send mail:&lt;br /&gt;
 [[cat]] /var/log/mail.info [[piping||]] [[grep]] relay=&lt;br /&gt;
&lt;br /&gt;
==How to configure it==&lt;br /&gt;
&lt;br /&gt;
=== Deliver all mail to [[procmail]] ===&lt;br /&gt;
&lt;br /&gt;
To make your [[postfix]] [[MTA]] deliver all mail to [[procmail]] for further processing,&lt;br /&gt;
* make sure procmail is installed&lt;br /&gt;
* enter in /etc/postfix/main.cf a line like:&lt;br /&gt;
 mailbox_command = /usr/bin/procmail&lt;br /&gt;
* restart your postfix&lt;br /&gt;
 /etc/init.d/postfix restart&lt;br /&gt;
&lt;br /&gt;
===Catch-all e-Mail addresses===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a domain ''example.org'' and want all mails for this domain in a mailbox, so, no more &amp;quot;user does not exist&amp;quot; replies to senders. Then you configure a catch-all for this domain.&lt;br /&gt;
&lt;br /&gt;
Go to [[webmin]]-&amp;gt;[[server]]s-&amp;gt;[[postfix]]-&amp;gt;virtual domain &lt;br /&gt;
Enter a Domain mapping lookup table. Click on &amp;quot;new&amp;quot; and map, e.g. ''example.org'' to ''exampleuser''.&lt;br /&gt;
&lt;br /&gt;
===Allow sending from a [[MUA]]===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a [[mail server]] running [[postfix]] and you want to use it in a [[MUA]] (e.g. [[kmail]]) as [[smtp]] [[server]]. This will most likely fail with an error message like&lt;br /&gt;
 Relay access denied&lt;br /&gt;
And you will have no chance to authenticate. To change this, add&lt;br /&gt;
 smtpd_sasl_auth_enable=yes&lt;br /&gt;
to /etc/postfix/main.cf, and [[outcomment]] all lines starting with tlsmgr in /etc/postfix/master.conf.&lt;br /&gt;
&lt;br /&gt;
==Working with the Mail Queue==&lt;br /&gt;
The outgoing mail queue is often stuck, so here's how you deal with that:&lt;br /&gt;
&lt;br /&gt;
To watch your outgoing mail queue, use the [[command]]&lt;br /&gt;
 mailq&lt;br /&gt;
&lt;br /&gt;
To read your outgoing mail queue, use [[webmin]] which has an own module for [[Postfix]].&lt;br /&gt;
&lt;br /&gt;
To flush your mail queue, use&lt;br /&gt;
 postqueue -f&lt;br /&gt;
&lt;br /&gt;
To delete a mail from your mail queue, find out its ''mail-id'' by running &lt;br /&gt;
 mailq&lt;br /&gt;
then delete the mail by running&lt;br /&gt;
 postsuper -d ''mail-id''&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[mail]]&lt;br /&gt;
* [[smtp]]&lt;br /&gt;
* [[qmail]]&lt;br /&gt;
* [[mailq]]&lt;br /&gt;
* [[Postfix Virtual Domain Hosting]]&lt;br /&gt;
* [[postfix with clamav-milter]]&lt;br /&gt;
* [[sendmail]]&lt;br /&gt;
* [[fetchmail]]&lt;br /&gt;
* [[procmail]]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.postfix.org/ Postfix homepage] (''www.postfix.org'')&lt;br /&gt;
&lt;br /&gt;
[[Category:Mail]]&lt;br /&gt;
[[Category:Mail Transfer Agents]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Qmail&amp;diff=38586</id>
		<title>Qmail</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Qmail&amp;diff=38586"/>
		<updated>2008-05-02T16:04:05Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: cat MTA&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''QMail''' is a package to build a [[mail server]]. It is developed by [[Dan Bernstein]]. &lt;br /&gt;
&lt;br /&gt;
Advantages of QMail: it is secure, fast, compact, incredibly configurable and portable, ...&lt;br /&gt;
&lt;br /&gt;
Disadvantages: it needs to be build from source, needs patches to do special things, documentation is for geeks, imposes other goodies (like ucspi-tcp and daemontools) on the installer, ...&lt;br /&gt;
&lt;br /&gt;
QMail is used by many exciting packages, such as [[EZ-MLM]]&lt;br /&gt;
&lt;br /&gt;
===external links ===&lt;br /&gt;
* [http://www.qmail.org www.qmail.org]&lt;br /&gt;
* [http://www.lifewithqmail.org www.lifewithqmail.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Mail]]&lt;br /&gt;
[[Category:Mail Transfer Agents]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Nullmailer&amp;diff=38585</id>
		<title>Nullmailer</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Nullmailer&amp;diff=38585"/>
		<updated>2008-05-02T16:03:48Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: cat&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''nullmailer''' is, according to its own [[man]] page,  &amp;quot;a simple and secure relay-only mail transport agent.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nullmailer is an appropriate choice of mail agent for machines that receive no local mail, and only need to generate messages for sending off the system, such as a web server with applications that occasionally send notifications.  nullmailer is easy to install and requires little ongoing administration.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Obtain the source archive and unpack.&lt;br /&gt;
&lt;br /&gt;
Create a user &amp;quot;nullmailer&amp;quot; and a group &amp;quot;nullmailer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the source tree:&lt;br /&gt;
  ./configure&lt;br /&gt;
  make&lt;br /&gt;
  make install install-root&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
nullmailer's config files may be found in /usr/local/etc/nullmailer/.&lt;br /&gt;
&lt;br /&gt;
In the file &amp;quot;me&amp;quot;, put your machine's hostname:&lt;br /&gt;
&lt;br /&gt;
  foo.example.org&lt;br /&gt;
&lt;br /&gt;
In the file &amp;quot;remotes&amp;quot;, list those servers through which all mail should be relayed, along with the protocol:&lt;br /&gt;
&lt;br /&gt;
  mailserv.example.org smtp&lt;br /&gt;
  mailserv2.example.org smtp&lt;br /&gt;
  mailserv3.foo.org smtp&lt;br /&gt;
&lt;br /&gt;
On these remote machines, with their more traditional mail agents, don't forget to allow the nullmailer-using machine to relay.&lt;br /&gt;
For example, in [[Postfix]], you would list IP numbers of the machine(s) using nullmailer in &amp;quot;mynetworks&amp;quot; of &amp;quot;main.cf&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Running the daemon==&lt;br /&gt;
Like any other MTA, nullmailer runs as a daemon, which manages the queue and sends mail on its way.  Start the daemon from your RC files:&lt;br /&gt;
&lt;br /&gt;
;/etc/rc.local:&lt;br /&gt;
:/usr/local/sbin/nullmailer-send &amp;amp;amp;  ## ampersand required to force it to go background&lt;br /&gt;
&lt;br /&gt;
==Sending mail==&lt;br /&gt;
&amp;quot;nullmailer-inject&amp;quot; receives a standard email message on STDIN which it then writes to the queue (a pipe, and several directories under /usr/local/var/nullmailer/).&lt;br /&gt;
&lt;br /&gt;
To be effective, nullmailer-inject should masquerade as sendmail, for benefit of the many scripts that reference /usr/sbin/sendmail.  Some of these invoke it as &amp;quot;sendmail -t&amp;quot;, which breaks nullmailer-inject; this author has found the following setup useful:&lt;br /&gt;
&lt;br /&gt;
* /usr/sbin/sendmail symlinks to /etc/alternatives/mta  (usually this already exists)&lt;br /&gt;
* /etc/alternatives/mta symlinks to wrap-nullmailer&lt;br /&gt;
* wrap-nullmailer is a shell script that discards inappropriate sendmail-like parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
## wrap-nullmailer - 2008/04 Matt Hucke&lt;br /&gt;
## sendmail is often called with -t; nullmailer-inject doesn't like that.&lt;br /&gt;
## this just calls nullmailer, stripping out any args with leading dashes.&lt;br /&gt;
&lt;br /&gt;
NULLMAILER=/usr/local/bin/nullmailer-inject&lt;br /&gt;
&lt;br /&gt;
declare -a nmargs&lt;br /&gt;
&lt;br /&gt;
for foo in &amp;quot;$@&amp;quot; ; do&lt;br /&gt;
    case $foo in &lt;br /&gt;
        -*) # echo skip $foo&lt;br /&gt;
        ;;&lt;br /&gt;
&lt;br /&gt;
        *) nmargs[${#nmargs[@]}]=&amp;quot;$foo&amp;quot;     ## push it&lt;br /&gt;
        ;;&lt;br /&gt;
    esac&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
$NULLMAILER ${nmargs[@]}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Mail]]&lt;br /&gt;
[[Category:Mail Transfer Agents]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=User:MattHucke&amp;diff=38584</id>
		<title>User:MattHucke</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=User:MattHucke&amp;diff=38584"/>
		<updated>2008-05-02T15:59:06Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: o hai!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I joined this site in May 2008.  I've been running Linux at home since approximately 1995 on my primary desktop machine.  For web and mail servers, I've generally preferred [[FreeBSD]], but now now switched to Linux thanks to ease of setting up virtual machines at such places as [http://www.linode.com Linode], my current hosting provider.&lt;br /&gt;
&lt;br /&gt;
I am the author of the [http://www.baldrickframework.org Baldrick Application Framework], an open source Perl library for web applications.&lt;br /&gt;
&lt;br /&gt;
==Articles I have created==&lt;br /&gt;
* [[nullmailer]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Nullmailer&amp;diff=38583</id>
		<title>Nullmailer</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Nullmailer&amp;diff=38583"/>
		<updated>2008-05-02T15:54:30Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: /* Running the daemon */ they ate my ampersand!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''nullmailer''' is, according to its own [[man]] page,  &amp;quot;a simple and secure relay-only mail transport agent.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nullmailer is an appropriate choice of mail agent for machines that receive no local mail, and only need to generate messages for sending off the system, such as a web server with applications that occasionally send notifications.  nullmailer is easy to install and requires little ongoing administration.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Obtain the source archive and unpack.&lt;br /&gt;
&lt;br /&gt;
Create a user &amp;quot;nullmailer&amp;quot; and a group &amp;quot;nullmailer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the source tree:&lt;br /&gt;
  ./configure&lt;br /&gt;
  make&lt;br /&gt;
  make install install-root&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
nullmailer's config files may be found in /usr/local/etc/nullmailer/.&lt;br /&gt;
&lt;br /&gt;
In the file &amp;quot;me&amp;quot;, put your machine's hostname:&lt;br /&gt;
&lt;br /&gt;
  foo.example.org&lt;br /&gt;
&lt;br /&gt;
In the file &amp;quot;remotes&amp;quot;, list those servers through which all mail should be relayed, along with the protocol:&lt;br /&gt;
&lt;br /&gt;
  mailserv.example.org smtp&lt;br /&gt;
  mailserv2.example.org smtp&lt;br /&gt;
  mailserv3.foo.org smtp&lt;br /&gt;
&lt;br /&gt;
On these remote machines, with their more traditional mail agents, don't forget to allow the nullmailer-using machine to relay.&lt;br /&gt;
For example, in [[Postfix]], you would list IP numbers of the machine(s) using nullmailer in &amp;quot;mynetworks&amp;quot; of &amp;quot;main.cf&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Running the daemon==&lt;br /&gt;
Like any other MTA, nullmailer runs as a daemon, which manages the queue and sends mail on its way.  Start the daemon from your RC files:&lt;br /&gt;
&lt;br /&gt;
;/etc/rc.local:&lt;br /&gt;
:/usr/local/sbin/nullmailer-send &amp;amp;amp;  ## ampersand required to force it to go background&lt;br /&gt;
&lt;br /&gt;
==Sending mail==&lt;br /&gt;
&amp;quot;nullmailer-inject&amp;quot; receives a standard email message on STDIN which it then writes to the queue (a pipe, and several directories under /usr/local/var/nullmailer/).&lt;br /&gt;
&lt;br /&gt;
To be effective, nullmailer-inject should masquerade as sendmail, for benefit of the many scripts that reference /usr/sbin/sendmail.  Some of these invoke it as &amp;quot;sendmail -t&amp;quot;, which breaks nullmailer-inject; this author has found the following setup useful:&lt;br /&gt;
&lt;br /&gt;
* /usr/sbin/sendmail symlinks to /etc/alternatives/mta  (usually this already exists)&lt;br /&gt;
* /etc/alternatives/mta symlinks to wrap-nullmailer&lt;br /&gt;
* wrap-nullmailer is a shell script that discards inappropriate sendmail-like parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
## wrap-nullmailer - 2008/04 Matt Hucke&lt;br /&gt;
## sendmail is often called with -t; nullmailer-inject doesn't like that.&lt;br /&gt;
## this just calls nullmailer, stripping out any args with leading dashes.&lt;br /&gt;
&lt;br /&gt;
NULLMAILER=/usr/local/bin/nullmailer-inject&lt;br /&gt;
&lt;br /&gt;
declare -a nmargs&lt;br /&gt;
&lt;br /&gt;
for foo in &amp;quot;$@&amp;quot; ; do&lt;br /&gt;
    case $foo in &lt;br /&gt;
        -*) # echo skip $foo&lt;br /&gt;
        ;;&lt;br /&gt;
&lt;br /&gt;
        *) nmargs[${#nmargs[@]}]=&amp;quot;$foo&amp;quot;     ## push it&lt;br /&gt;
        ;;&lt;br /&gt;
    esac&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
$NULLMAILER ${nmargs[@]}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Mail]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Nullmailer&amp;diff=38582</id>
		<title>Nullmailer</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Nullmailer&amp;diff=38582"/>
		<updated>2008-05-02T15:53:07Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: /* Sending mail */ format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''nullmailer''' is, according to its own [[man]] page,  &amp;quot;a simple and secure relay-only mail transport agent.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nullmailer is an appropriate choice of mail agent for machines that receive no local mail, and only need to generate messages for sending off the system, such as a web server with applications that occasionally send notifications.  nullmailer is easy to install and requires little ongoing administration.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Obtain the source archive and unpack.&lt;br /&gt;
&lt;br /&gt;
Create a user &amp;quot;nullmailer&amp;quot; and a group &amp;quot;nullmailer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the source tree:&lt;br /&gt;
  ./configure&lt;br /&gt;
  make&lt;br /&gt;
  make install install-root&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
nullmailer's config files may be found in /usr/local/etc/nullmailer/.&lt;br /&gt;
&lt;br /&gt;
In the file &amp;quot;me&amp;quot;, put your machine's hostname:&lt;br /&gt;
&lt;br /&gt;
  foo.example.org&lt;br /&gt;
&lt;br /&gt;
In the file &amp;quot;remotes&amp;quot;, list those servers through which all mail should be relayed, along with the protocol:&lt;br /&gt;
&lt;br /&gt;
  mailserv.example.org smtp&lt;br /&gt;
  mailserv2.example.org smtp&lt;br /&gt;
  mailserv3.foo.org smtp&lt;br /&gt;
&lt;br /&gt;
On these remote machines, with their more traditional mail agents, don't forget to allow the nullmailer-using machine to relay.&lt;br /&gt;
For example, in [[Postfix]], you would list IP numbers of the machine(s) using nullmailer in &amp;quot;mynetworks&amp;quot; of &amp;quot;main.cf&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Running the daemon==&lt;br /&gt;
Like any other MTA, nullmailer runs as a daemon, which manages the queue and sends mail on its way.  Start the daemon from your RC files:&lt;br /&gt;
&lt;br /&gt;
;/etc/rc.local:&lt;br /&gt;
:/usr/local/sbin/nullmailer-send&lt;br /&gt;
&lt;br /&gt;
==Sending mail==&lt;br /&gt;
&amp;quot;nullmailer-inject&amp;quot; receives a standard email message on STDIN which it then writes to the queue (a pipe, and several directories under /usr/local/var/nullmailer/).&lt;br /&gt;
&lt;br /&gt;
To be effective, nullmailer-inject should masquerade as sendmail, for benefit of the many scripts that reference /usr/sbin/sendmail.  Some of these invoke it as &amp;quot;sendmail -t&amp;quot;, which breaks nullmailer-inject; this author has found the following setup useful:&lt;br /&gt;
&lt;br /&gt;
* /usr/sbin/sendmail symlinks to /etc/alternatives/mta  (usually this already exists)&lt;br /&gt;
* /etc/alternatives/mta symlinks to wrap-nullmailer&lt;br /&gt;
* wrap-nullmailer is a shell script that discards inappropriate sendmail-like parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
## wrap-nullmailer - 2008/04 Matt Hucke&lt;br /&gt;
## sendmail is often called with -t; nullmailer-inject doesn't like that.&lt;br /&gt;
## this just calls nullmailer, stripping out any args with leading dashes.&lt;br /&gt;
&lt;br /&gt;
NULLMAILER=/usr/local/bin/nullmailer-inject&lt;br /&gt;
&lt;br /&gt;
declare -a nmargs&lt;br /&gt;
&lt;br /&gt;
for foo in &amp;quot;$@&amp;quot; ; do&lt;br /&gt;
    case $foo in &lt;br /&gt;
        -*) # echo skip $foo&lt;br /&gt;
        ;;&lt;br /&gt;
&lt;br /&gt;
        *) nmargs[${#nmargs[@]}]=&amp;quot;$foo&amp;quot;     ## push it&lt;br /&gt;
        ;;&lt;br /&gt;
    esac&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
$NULLMAILER ${nmargs[@]}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Mail]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxquestions.org/index.php?title=Nullmailer&amp;diff=38581</id>
		<title>Nullmailer</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxquestions.org/index.php?title=Nullmailer&amp;diff=38581"/>
		<updated>2008-05-02T15:51:50Z</updated>

		<summary type="html">&lt;p&gt;MattHucke: new, with shell script &amp;amp; install instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''nullmailer''' is, according to its own [[man]] page,  &amp;quot;a simple and secure relay-only mail transport agent.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nullmailer is an appropriate choice of mail agent for machines that receive no local mail, and only need to generate messages for sending off the system, such as a web server with applications that occasionally send notifications.  nullmailer is easy to install and requires little ongoing administration.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Obtain the source archive and unpack.&lt;br /&gt;
&lt;br /&gt;
Create a user &amp;quot;nullmailer&amp;quot; and a group &amp;quot;nullmailer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the source tree:&lt;br /&gt;
  ./configure&lt;br /&gt;
  make&lt;br /&gt;
  make install install-root&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
nullmailer's config files may be found in /usr/local/etc/nullmailer/.&lt;br /&gt;
&lt;br /&gt;
In the file &amp;quot;me&amp;quot;, put your machine's hostname:&lt;br /&gt;
&lt;br /&gt;
  foo.example.org&lt;br /&gt;
&lt;br /&gt;
In the file &amp;quot;remotes&amp;quot;, list those servers through which all mail should be relayed, along with the protocol:&lt;br /&gt;
&lt;br /&gt;
  mailserv.example.org smtp&lt;br /&gt;
  mailserv2.example.org smtp&lt;br /&gt;
  mailserv3.foo.org smtp&lt;br /&gt;
&lt;br /&gt;
On these remote machines, with their more traditional mail agents, don't forget to allow the nullmailer-using machine to relay.&lt;br /&gt;
For example, in [[Postfix]], you would list IP numbers of the machine(s) using nullmailer in &amp;quot;mynetworks&amp;quot; of &amp;quot;main.cf&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Running the daemon==&lt;br /&gt;
Like any other MTA, nullmailer runs as a daemon, which manages the queue and sends mail on its way.  Start the daemon from your RC files:&lt;br /&gt;
&lt;br /&gt;
;/etc/rc.local:&lt;br /&gt;
:/usr/local/sbin/nullmailer-send&lt;br /&gt;
&lt;br /&gt;
==Sending mail==&lt;br /&gt;
&amp;quot;nullmailer-inject&amp;quot; receives a standard email message on STDIN which it then writes to the queue (a pipe, and several directories under /usr/local/var/nullmailer/).&lt;br /&gt;
&lt;br /&gt;
To be effective, nullmailer-inject should masquerade as sendmail, for benefit of the many scripts that reference /usr/sbin/sendmail.  Some of these invoke it as &amp;quot;sendmail -t&amp;quot;, which breaks nullmailer-inject; this author has found the following setup useful:&lt;br /&gt;
&lt;br /&gt;
/usr/sbin/sendmail symlinks to /etc/alternatives/mta  (usually this already exists)&lt;br /&gt;
/etc/alternatives/mta symlinks to wrap-nullmailer&lt;br /&gt;
wrap-nullmailer is a shell script that discards inappropriate sendmail-like parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
## wrapper - 2008/04 Matt Hucke&lt;br /&gt;
## sendmail is often called with -t; nullmailer-inject doesn't like that.&lt;br /&gt;
## this just calls nullmailer, stripping out any args with leading dashes.&lt;br /&gt;
&lt;br /&gt;
NULLMAILER=/usr/local/bin/nullmailer-inject&lt;br /&gt;
&lt;br /&gt;
declare -a nmargs&lt;br /&gt;
&lt;br /&gt;
for foo in &amp;quot;$@&amp;quot; ; do&lt;br /&gt;
    case $foo in &lt;br /&gt;
        -*) # echo skip $foo&lt;br /&gt;
        ;;&lt;br /&gt;
&lt;br /&gt;
        *) nmargs[${#nmargs[@]}]=&amp;quot;$foo&amp;quot;     ## push it&lt;br /&gt;
        ;;&lt;br /&gt;
    esac&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
$NULLMAILER ${nmargs[@]}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Mail]]&lt;/div&gt;</summary>
		<author><name>MattHucke</name></author>
	</entry>
</feed>