SlideShare una empresa de Scribd logo
1 de 3
Descargar para leer sin conexión
1 Darba uzdevums
Darba uzdevums ir uz iepriekš izveidotās Ubuntu 6.06 sistēmas izveidot pasta serveri ar:

  • ziņojumu saņemšanas un pārsūtīšanas aģentu (MTA - message transfer agent, jeb
    SMTP dēmonu.
  • piekļuves programmu pastkastītēm, jeb IMAP (vai POP) dēmonu.

Šī laboratorijas darba veidošanā jāizmanto Ubuntu 6.06 dokumentāciju1 , bet pieejamas
ir arī daudz citu pamācību, piemēram no Ubuntu Community Documentation 2 .


2 Postfix uzstādīšana
Vadoties pēc https://help.ubuntu.com/6.06/ubuntu/serverguide/C/email-services.html#postfix,
jāuzstāda Postfix serveris.
   Vadoties pēc instrukcijas jāņem vērā, ka

  • pirms pakotņu uzstādīšanas ir jāatjauno pakotņu saraksts un sistēma:

        sudo apt-get update
        sudo apt-get dist-upgrade -y


  • visas komandas ir tomēr jāizpilda ar root tiesībām, t.i., komandu priekšā ir jālieto
    sudo.
  • ar telnet programmu ir jāslēdzas klāt hostam 127.0.0.1, nevis mail.example.com
  • Jāpievieno savi domēni/hosti (example.com un mail.example.com) pie servera sa-
    ņēmēju saraksta, un jānorāda, kur postfix nogādās vēstules, kuras pienākas saviem
    saņēmējiem (zem mājas direktorijas, direktorijā “Maildir”).

        sudo postconf -e 'mydestination = localhost, example.com, mail.example.com'
        sudo postconf -e 'home_mailbox = Maildir/'


  • jāpārstartē Postfix serveris

        sudo /etc/init.d/postfix restart


   Pēc Postfix uzstādīšanas (līdz nodaļai Exim4) vēlams pārbaudīt tā darbību. Lai
pārbaudītu, vai pasta serveris strādā:

  • Uzstādam pakotni mailx, ar kuru CLI var sūtīt e-pastus
  1
      https://help.ubuntu.com/6.06/ubuntu/serverguide/C/email-services.html
  2
      https://help.ubuntu.com/community/Postfix


                                                  1
sudo apt-get install mailx -y

• Pārbaudam, vai pasta serveris startējies

  ps axfu | grep postfix

• Apskatamies, vai tīkla konekcijas darbojas - vajadzētu būt programmai ”master”,
  kas ”klausās” uz 25 tcp portu (SMTP ports)

  sudo netstat -ntpl

• Nosūtam e-pastu ar subjektu ”Parbaude” uz savu e-pasta adresi. user@venta.lv
  vietā ir jāieraksta sava e-pasta adrese. Pēc nosūtīšanas, vēlams arī pārbaudīt, vai
  e-pasts saņemts

  echo Sveiks     | mail -s "Parbaude" user@venta.lv

• Pārskatam pēdējos žurnāla faila ierakstus - tur vajadzētu redzēt ziņojumus par
  epasta nosūtīšanas gaitu un statusu:

  tail /var/log/mail.log

• Jārediģē fails /etc/hosts un jānorāda, ka hosts mail.example.com atrodas adresē
  127.0.0.1, piem..:

    ...
  127.0.0.1 localhost mail.example.com
    ...


• jānosūta e-pasts lokālajam lietotājam user@mail.example.com

  echo Sveiks     | mail -s "Parbaude" user@mail.example.com


• Žurnāla failā jāpārbauda, vai e-pasts ir nogādāts - jābūt ierakstam .`` ...(delivered
  to mailbox)''

  tail /var/log/mail.log




                                        2
3 Dovecot uzstādīšana
Vadoties pēc https://help.ubuntu.com/6.06/ubuntu/serverguide/C/email-services.html#dovecot-
server, jāuzstāda Dovecot serveris.
    Atšķirībā no dokumentācijas, konfigurācijas failā /etc/dovecot/dovecot.conf :

  • jāaktivizē (jāatkomentē rindiņas konfigurācijas failā) jau esošās ssl atslēgas un ser-
    tifikāti:

     ssl_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
     ssl_key_file = /etc/ssl/private/ssl-cert-snakeoil.key

  • Kā vieta, kur glabājas e-pasti, jānorāda direktorija Maildir lietotāju mājas direk-
    torijās:

     default_mail_env = maildir:~/Maildir

    Lai pārbaudītu vai e-pasta serveris strādā, no sava darba datora ir jākonfigurē e-pasta
programma (piem., Thunderbird), norādot, ka tiek izmantots IMAP serveris. IMAP
servera vietā jānorāda servera IP adrese. Ar e-pasta programmu ir jāpieslēdzas serverim
un jāpārbauda, vai e-pasti ir saņemti.
    Tālāk var:

  • konfigurēt pasta programmas SMTP servera uzstādījumus, norādot kā izejošo serveri
    sava servera IP adresi.
  • uz pasta servera izveidot jaunus lietotājus, un pārbaudīt vai tiem var nosūtīt e-
    pastus un vai tie tos saņem.




                                            3

Más contenido relacionado

Destacado

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Destacado (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

8 ld

  • 1. 1 Darba uzdevums Darba uzdevums ir uz iepriekš izveidotās Ubuntu 6.06 sistēmas izveidot pasta serveri ar: • ziņojumu saņemšanas un pārsūtīšanas aģentu (MTA - message transfer agent, jeb SMTP dēmonu. • piekļuves programmu pastkastītēm, jeb IMAP (vai POP) dēmonu. Šī laboratorijas darba veidošanā jāizmanto Ubuntu 6.06 dokumentāciju1 , bet pieejamas ir arī daudz citu pamācību, piemēram no Ubuntu Community Documentation 2 . 2 Postfix uzstādīšana Vadoties pēc https://help.ubuntu.com/6.06/ubuntu/serverguide/C/email-services.html#postfix, jāuzstāda Postfix serveris. Vadoties pēc instrukcijas jāņem vērā, ka • pirms pakotņu uzstādīšanas ir jāatjauno pakotņu saraksts un sistēma: sudo apt-get update sudo apt-get dist-upgrade -y • visas komandas ir tomēr jāizpilda ar root tiesībām, t.i., komandu priekšā ir jālieto sudo. • ar telnet programmu ir jāslēdzas klāt hostam 127.0.0.1, nevis mail.example.com • Jāpievieno savi domēni/hosti (example.com un mail.example.com) pie servera sa- ņēmēju saraksta, un jānorāda, kur postfix nogādās vēstules, kuras pienākas saviem saņēmējiem (zem mājas direktorijas, direktorijā “Maildir”). sudo postconf -e 'mydestination = localhost, example.com, mail.example.com' sudo postconf -e 'home_mailbox = Maildir/' • jāpārstartē Postfix serveris sudo /etc/init.d/postfix restart Pēc Postfix uzstādīšanas (līdz nodaļai Exim4) vēlams pārbaudīt tā darbību. Lai pārbaudītu, vai pasta serveris strādā: • Uzstādam pakotni mailx, ar kuru CLI var sūtīt e-pastus 1 https://help.ubuntu.com/6.06/ubuntu/serverguide/C/email-services.html 2 https://help.ubuntu.com/community/Postfix 1
  • 2. sudo apt-get install mailx -y • Pārbaudam, vai pasta serveris startējies ps axfu | grep postfix • Apskatamies, vai tīkla konekcijas darbojas - vajadzētu būt programmai ”master”, kas ”klausās” uz 25 tcp portu (SMTP ports) sudo netstat -ntpl • Nosūtam e-pastu ar subjektu ”Parbaude” uz savu e-pasta adresi. user@venta.lv vietā ir jāieraksta sava e-pasta adrese. Pēc nosūtīšanas, vēlams arī pārbaudīt, vai e-pasts saņemts echo Sveiks | mail -s "Parbaude" user@venta.lv • Pārskatam pēdējos žurnāla faila ierakstus - tur vajadzētu redzēt ziņojumus par epasta nosūtīšanas gaitu un statusu: tail /var/log/mail.log • Jārediģē fails /etc/hosts un jānorāda, ka hosts mail.example.com atrodas adresē 127.0.0.1, piem..: ... 127.0.0.1 localhost mail.example.com ... • jānosūta e-pasts lokālajam lietotājam user@mail.example.com echo Sveiks | mail -s "Parbaude" user@mail.example.com • Žurnāla failā jāpārbauda, vai e-pasts ir nogādāts - jābūt ierakstam .`` ...(delivered to mailbox)'' tail /var/log/mail.log 2
  • 3. 3 Dovecot uzstādīšana Vadoties pēc https://help.ubuntu.com/6.06/ubuntu/serverguide/C/email-services.html#dovecot- server, jāuzstāda Dovecot serveris. Atšķirībā no dokumentācijas, konfigurācijas failā /etc/dovecot/dovecot.conf : • jāaktivizē (jāatkomentē rindiņas konfigurācijas failā) jau esošās ssl atslēgas un ser- tifikāti: ssl_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem ssl_key_file = /etc/ssl/private/ssl-cert-snakeoil.key • Kā vieta, kur glabājas e-pasti, jānorāda direktorija Maildir lietotāju mājas direk- torijās: default_mail_env = maildir:~/Maildir Lai pārbaudītu vai e-pasta serveris strādā, no sava darba datora ir jākonfigurē e-pasta programma (piem., Thunderbird), norādot, ka tiek izmantots IMAP serveris. IMAP servera vietā jānorāda servera IP adrese. Ar e-pasta programmu ir jāpieslēdzas serverim un jāpārbauda, vai e-pasti ir saņemti. Tālāk var: • konfigurēt pasta programmas SMTP servera uzstādījumus, norādot kā izejošo serveri sava servera IP adresi. • uz pasta servera izveidot jaunus lietotājus, un pārbaudīt vai tiem var nosūtīt e- pastus un vai tie tos saņem. 3